diff --git a/cnslock/CHANGES b/cnslock/CHANGES index 43cd819..4692af2 100644 --- a/cnslock/CHANGES +++ b/cnslock/CHANGES @@ -2,7 +2,7 @@ cnslock 1.02 (27th October 2002) * Added feature to allow applet to be run in window managers such as enlightenment, fvwm, etc. - + cnslock 1.01 (11th October 2002) * First public release. diff --git a/cnslock/README b/cnslock/README index d915956..ed5e083 100644 --- a/cnslock/README +++ b/cnslock/README @@ -10,7 +10,7 @@ as I have a wireless keyboard with no leds on it. Bugs ------------------------------------------------------------ -If you discover any bug in this software, please send a +If you discover any bug in this software, please send a bugreport to lists@sprig.dyn.dhs.org and describe the problem with as many details as possible. diff --git a/cnslock/applet.c b/cnslock/applet.c index e9f457c..cec8c27 100644 --- a/cnslock/applet.c +++ b/cnslock/applet.c @@ -78,6 +78,6 @@ void make_new_cnslock_dockapp(int manager_style) if(posx!=-1 && posy!=-1) gdk_window_move(ad.win, posx, posy); - + #undef MASK } diff --git a/cnslock/cnslock.c b/cnslock/cnslock.c index f063475..75f348c 100644 --- a/cnslock/cnslock.c +++ b/cnslock/cnslock.c @@ -151,7 +151,7 @@ int main(int argc, char **argv) if (manager_style==0) gdk_draw_rgb_image(ad.iconwin, ad.gc, XMIN, YMIN, XMAX, YMAX, GDK_RGB_DITHER_NONE, ad.rgb, XMAX * 3); - else + else gdk_draw_rgb_image(ad.win, ad.gc, XMIN, YMIN, XMAX, YMAX, GDK_RGB_DITHER_NONE, ad.rgb, XMAX * 3); } return 0; @@ -188,7 +188,7 @@ void cnslock_update(void) void prepare_backbuffer(int solid) { make_rgb_buffer256(ad.rgb,none_data,none_width,none_height,1, *none_cmap); - + /* copy it to the "frequent use" buffer */ memcpy(&ad.bgr, &ad.rgb, RGBSIZE); @@ -238,7 +238,7 @@ void parse_options(int argc, char *argv[]) manager_style = 1; break; } - } + } } void do_version(void) diff --git a/cnslock/graphics/none.h b/cnslock/graphics/none.h index 63c2344..e45fddf 100644 --- a/cnslock/graphics/none.h +++ b/cnslock/graphics/none.h @@ -259,7 +259,7 @@ char none_cmap[256][3] = { {255,255,255}, {255,255,255} }; - + char none_data[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, diff --git a/cnslock/include/defines.h b/cnslock/include/defines.h index 52fbd2e..3fe00ae 100644 --- a/cnslock/include/defines.h +++ b/cnslock/include/defines.h @@ -2,7 +2,7 @@ #define DEFINES_H /* Below this line, there are only defines that users don't have to - care about normally. + care about normally. -----------------------------------------------------------------------------*/ /* perform clipping outside this range, also this is the size of the diff --git a/cnslock/kleds.c b/cnslock/kleds.c index 4c93386..faf2740 100644 --- a/cnslock/kleds.c +++ b/cnslock/kleds.c @@ -1,5 +1,5 @@ /* - This code is based upon some lines(actually two lines :-) + This code is based upon some lines(actually two lines :-) in E-Leds by Mathias Meisfjordskar Released under GPL. */ diff --git a/wmcalclockkbd/olddoc/CHANGES.wmCalClock b/wmcalclockkbd/olddoc/CHANGES.wmCalClock index a225d43..47731d7 100644 --- a/wmcalclockkbd/olddoc/CHANGES.wmCalClock +++ b/wmcalclockkbd/olddoc/CHANGES.wmCalClock @@ -32,10 +32,10 @@ Version 1.23 - released March 20, 1999. Version 1.22 - released February 24, 1999. Added double click detection and -e command-line option. - + Version 1.21 - released February 4, 1999. cosmetic for AfterStep users. removed spurious black line at RHS edge an mask. - + Version 1.2 - released January 14, 1999. Changed support for LowColor Pixmap. Now, check for Depth automatically. If its <= 8, then use LowColor. diff --git a/wmcalclockkbd/olddoc/HINTS.wmCalClock b/wmcalclockkbd/olddoc/HINTS.wmCalClock index 9dc1386..d3fb265 100644 --- a/wmcalclockkbd/olddoc/HINTS.wmCalClock +++ b/wmcalclockkbd/olddoc/HINTS.wmCalClock @@ -21,14 +21,14 @@ usage: wmCalClock [-b ] [-tc ] [-bc ] [-e "Command"] [-S] -S Do not show seconds. -24 Show 24-hour time. Default is 12 hour AM/PM Time. -g Show Greenwich time. - -s Show Greenwich Mean Sidereal Time (GMST) in 24-hour format. - -L Show Local Sidereal Time (LST) in 24-hour format. + -s Show Greenwich Mean Sidereal Time (GMST) in 24-hour format. + -L Show Local Sidereal Time (LST) in 24-hour format. Longitude is in degrees (- for West + for East). -l Use a low-color pixmap to conserve colors. On 8-bit displays the low color pixmap will always be used. -h Display help screen. -Example: wmCalClock -b 100 -tc #001100 -bc #7e9e69 +Example: wmCalClock -b 100 -tc #001100 -bc #7e9e69 WindowMaker. @@ -38,12 +38,12 @@ In WindowMaker simply drag and drop the wmCalClock App on the WindowMaker Dock o Afterstep. --------- -Afterstep users put the following in their .steprc "Wharf wmCalClock - MaxSwallow +Afterstep users put the following in their .steprc "Wharf wmCalClock - MaxSwallow "wmCalClock" wmCalClock &". Dont use Afterstep so I have no idea if it works... Note: AfterStep's Wharf supposedly has a problem with pixmaps that are larger than 60x60 pixels. Please tell the AfterStep authors to fix this, this is not -our fault, but a Wharf problem! +our fault, but a Wharf problem! Other window managers. ---------------------- diff --git a/wmcalclockkbd/olddoc/INSTALL.wmCalClock b/wmcalclockkbd/olddoc/INSTALL.wmCalClock index 8cf3bf6..c8b03e4 100644 --- a/wmcalclockkbd/olddoc/INSTALL.wmCalClock +++ b/wmcalclockkbd/olddoc/INSTALL.wmCalClock @@ -10,8 +10,8 @@ Installation 1) gunzip wmCalClock-x.xx.tar.gz 1) tar -xvf wmCalClock-x.xx.tar 2) cd wmCalClock-x.xx/Src/ -3) make -4) make install (must be root) +3) make +4) make install (must be root) 5) wmCalClock & (or 'wmCalClock -h' for help, or 'man wmCalClock' for the man page) diff --git a/wmcalclockkbd/olddoc/README.wmCalClock b/wmcalclockkbd/olddoc/README.wmCalClock index f1e6757..123ca61 100644 --- a/wmcalclockkbd/olddoc/README.wmCalClock +++ b/wmcalclockkbd/olddoc/README.wmCalClock @@ -1,8 +1,8 @@ wmCalClock-1.24 release ----------------------- Author....: Michael G. Henderson - - + + Description ----------- wmCalClock is a simple Calendar Clock that uses anti-aliased characters and @@ -18,7 +18,7 @@ BUGS Bug reports CHANGES Change history. COPYING GNU General Public License Version 2. TODO Wish list. - + Bugs ----- diff --git a/wmcalclockkbd/olddoc/TODO.wmCalClock b/wmcalclockkbd/olddoc/TODO.wmCalClock index 6adf8db..349e897 100644 --- a/wmcalclockkbd/olddoc/TODO.wmCalClock +++ b/wmcalclockkbd/olddoc/TODO.wmCalClock @@ -1,7 +1,7 @@ TODO List --------- - - Add in a few more fonts... Graphite would be nice! Or EagleFeather + - Add in a few more fonts... Graphite would be nice! Or EagleFeather (its a Frank Lloyd Wright inspired font)? - Allow fonts to be added externally via some sort of config file... @@ -9,17 +9,17 @@ TODO List - Add alarm clock mode? - graphical Moon-Phase Icon in Calendar section. - + - Day numbers in Calendar section. This is something that I would really like myself! - Allow Changing of fonts/colors for the main Calendar section. - Foreign language support... - + - Add indicators for Greenwich, sidereal, local sideareal time displays (right now you dont really know what it is displaying just by looking at it)... - + diff --git a/wmcalclockkbd/src/Makefile b/wmcalclockkbd/src/Makefile index 6e2c083..2534b04 100644 --- a/wmcalclockkbd/src/Makefile +++ b/wmcalclockkbd/src/Makefile @@ -22,7 +22,7 @@ OBJS = wmCalClock.o \ all: wmCalClock.o wmCalClockKbd wmCalClock.o: wmCalClock_master.xpm wmCalClock_mask.xbm -wmCalClockKbd: $(OBJS) +wmCalClockKbd: $(OBJS) $(CC) $(COPTS) $(SYSTEM) -o wmCalClockKbd $^ $(INCDIR) $(LIBDIR) $(LIBS) clean: @@ -33,5 +33,5 @@ clean: install: wmCalClockKbd install -c -s -m 0755 wmCalClockKbd $(DESTDIR)/bin - install -c -m 0644 wmCalClockKbd.1 $(DESTDIR)/share/man/man1 + install -c -m 0644 wmCalClockKbd.1 $(DESTDIR)/share/man/man1 diff --git a/wmcalclockkbd/src/wmCalClock.c b/wmcalclockkbd/src/wmCalClock.c index 85bf383..578328a 100644 --- a/wmcalclockkbd/src/wmCalClock.c +++ b/wmcalclockkbd/src/wmCalClock.c @@ -1,11 +1,11 @@ /* * * wmCalClock-1.25 (C) 1998, 1999 Mike Henderson (mghenderson@lanl.gov) - * + * * - Its a Calendar Clock.... - * - * - * + * + * + * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,7 +19,7 @@ * * You should have received a copy of the GNU General Public License * along with this program (see the file COPYING); if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA * * @@ -31,10 +31,10 @@ * * Version 1.24 - released March 27, 1999. * Added support for additional fonts for time field; - * + * * -tekton for Tekton * -arial for Arial (Helvetica) (this is the same font as usual) - * -luggerbug for LuggerBug + * -luggerbug for LuggerBug * -comicsans for ComicSans * -jazz for JazzPoster * @@ -66,7 +66,7 @@ * * Version 1.10 - released January 7, 1999. * Added support for LowColor Pixmap. (21 colors may still be a - * bit high, but the poor saps with 8-bit displays can at least run + * bit high, but the poor saps with 8-bit displays can at least run * it now.) * * Version 1.02 - released January 7, 1999. @@ -84,8 +84,8 @@ -/* - * Includes +/* + * Includes */ #include #include @@ -102,8 +102,8 @@ -/* - * Delay between refreshes (in microseconds) +/* + * Delay between refreshes (in microseconds) */ #define DELAY 10000L #define WMCALCLOCK_VERSION "1.25" @@ -122,13 +122,13 @@ void print_usage(); int xsMonth[12] = { 150, 170, 190, 212, 233, 256, 276, 294, 317, 337, 357, 380 }; int xeMonth[12] = { 168, 188, 210, 231, 254, 275, 292, 314, 335, 355, 377, 398 }; int xdMonth[12]; -int yMonth = 80; +int yMonth = 80; int ydMonth = 13; int xsDayOfWeek[7] = { 293, 150, 177, 201, 228, 253, 271 }; int xeDayOfWeek[7] = { 314, 175, 199, 226, 250, 269, 290 }; int xdDayOfWeek[7]; -int yDayOfWeek = 95; +int yDayOfWeek = 95; int ydDayOfWeek = 13; /* @@ -164,7 +164,7 @@ int ydDayOfMonth = 23; -/* +/* * Luggerbug Font Narrow - 13 pixels high. */ int xsDigits_Luggerbug13n[11] = { 75, 84, 92, 101, 110, 119, 127, 136, 143, 151, 159 }; @@ -173,7 +173,7 @@ int xdDigits_Luggerbug13n[11]; int yDigits_Luggerbug13n = 150; int ydDigits_Luggerbug13n = 13; -/* +/* * Luggerbug Font - 13 pixels high. */ int xsDigits_Luggerbug13[11] = { 75, 89, 103, 117, 131, 146, 159, 172, 184, 197, 208 }; @@ -182,7 +182,7 @@ int xdDigits_Luggerbug13[11]; int yDigits_Luggerbug13 = 136; int ydDigits_Luggerbug13 = 13; -/* +/* * ComicSans Font - 12 pixels high. */ int xsDigits_ComicSans12n[11] = { 338, 349, 359, 370, 380, 390, 401, 411, 422, 432, 444 }; @@ -191,7 +191,7 @@ int xdDigits_ComicSans12n[11]; int yDigits_ComicSans12n = 123; int ydDigits_ComicSans12n = 12; -/* +/* * ComicSans Font - 11 pixels high. */ int xsDigits_ComicSans11[11] = { 338, 353, 366, 380, 392, 407, 420, 434, 448, 461, 471 }; @@ -200,7 +200,7 @@ int xdDigits_ComicSans11[11]; int yDigits_ComicSans11 = 111; int ydDigits_ComicSans11 = 11; -/* +/* * JazzPoster Font Narrow - 12 pixels high. */ int xsDigits_JazzPoster12n[11] = { 211, 220, 226, 233, 241, 249, 256, 263, 271, 278, 286 }; @@ -209,7 +209,7 @@ int xdDigits_JazzPoster12n[11]; int yDigits_JazzPoster12n = 122; int ydDigits_JazzPoster12n = 12; -/* +/* * JazzPoster Font - 12 pixels high. */ int xsDigits_JazzPoster12[11] = { 211, 225, 234, 246, 258, 271, 282, 293, 305, 317, 328 }; @@ -219,7 +219,7 @@ int yDigits_JazzPoster12 = 109; int ydDigits_JazzPoster12 = 12; -/* +/* * Tekton Font - 12 pixels high Narrow (13 pixels high actually). */ int xsDigits_Tekton12n[11] = { 75, 84, 90, 97, 105, 114, 122, 131, 138, 147, 156 }; @@ -228,7 +228,7 @@ int xdDigits_Tekton12n[11]; int yDigits_Tekton12n = 122; int ydDigits_Tekton12n = 13; -/* +/* * Tekton Font - 12 pixels high. */ int xsDigits_Tekton12[11] = { 75, 89, 98, 111, 124, 137, 150, 164, 176, 191, 205 }; @@ -299,8 +299,8 @@ int LoadLayoutInfo(void); -/* - * main +/* + * main */ int main(int argc, char *argv[]) { @@ -433,12 +433,12 @@ int main(int argc, char *argv[]) { - - - - + + + + initXwindow(argc, argv); if (DisplayDepth <= 8) UseLowColorPixmap = 1; @@ -480,7 +480,7 @@ int main(int argc, char *argv[]) { - + /* * Loop until we die */ @@ -491,7 +491,7 @@ int main(int argc, char *argv[]) { /* - * Only process every 10th cycle of this loop. We run it faster + * Only process every 10th cycle of this loop. We run it faster * to catch expose events, etc... * */ @@ -562,7 +562,7 @@ int main(int argc, char *argv[]) { Flag = (Hours >= 12) ? 1 : 0; if (Hours == 0) Hours = 12; - else + else Hours = (Hours > 12) ? Hours-12 : Hours; } @@ -592,10 +592,10 @@ int main(int argc, char *argv[]) { copyXPMArea(5, 110, 54, 15, 5, 5); - /* + /* * Draw Hours */ - + /* dont show leading zeros */ if (D[0] > -1){ digit = D[0]; @@ -607,14 +607,14 @@ int main(int argc, char *argv[]) { copyXPMArea(xsDigits[digit], yDigits, xdDigits[digit], ydDigits, xoff+extradx, 7+extrady); xoff += (xdDigits[digit]+1); - /* + /* * Draw Colon */ digit = 10; copyXPMArea(xsDigits[digit], yDigits, xdDigits[digit], ydDigits, xoff+extradx, 7+extrady); xoff += (xdDigits[digit]+1); - /* + /* * Draw Minutes */ digit = D[3]; @@ -627,14 +627,14 @@ int main(int argc, char *argv[]) { if (ShowSeconds){ - /* + /* * Draw Colon */ digit = 10; copyXPMArea(xsDigits[digit], yDigits, xdDigits[digit], ydDigits, xoff+extradx, 7+extrady); xoff += (xdDigits[digit]+1); - /* + /* * Draw Seconds */ digit = D[6]; @@ -665,7 +665,7 @@ int main(int argc, char *argv[]) { if (Beep){ if ((Mins == 0)&&(Secs == 0)&&(OldSecs != Secs)) XBell(display, Volume); OldSecs = Secs; - + } @@ -682,18 +682,18 @@ int main(int argc, char *argv[]) { copyXPMArea(5, 70, 54, 35, 5, 24); - /* + /* * Draw Day of Week and Month */ wid = xdDayOfWeek[DayOfWeek] + xdMonth[Month] + 1; - copyXPMArea(xsDayOfWeek[DayOfWeek], yDayOfWeek, xdDayOfWeek[DayOfWeek], + copyXPMArea(xsDayOfWeek[DayOfWeek], yDayOfWeek, xdDayOfWeek[DayOfWeek], ydMonth, 33-wid/2, 64-24-4-12); - copyXPMArea(xsMonth[Month], yMonth, xdMonth[Month], + copyXPMArea(xsMonth[Month], yMonth, xdMonth[Month], ydMonth, 33-wid/2+xdDayOfWeek[DayOfWeek]+1, 64-24-4-12); - /* + /* * Draw Day of Month */ copyXPMArea(xsDayOfMonth[DayOfMonth], yDayOfMonth[DayOfMonth], xdDayOfMonth[DayOfMonth], ydDayOfMonth, 32-xdDayOfMonth2[DayOfMonth]/2, 36); @@ -715,7 +715,7 @@ int main(int argc, char *argv[]) { } else { /* - * Update the counter. + * Update the counter. */ ++n; @@ -745,7 +745,7 @@ int main(int argc, char *argv[]) { - /* + /* * Process any pending X events. */ while(XPending(display)) { @@ -782,9 +782,9 @@ int main(int argc, char *argv[]) { - - /* - * Redraw and wait for next update + + /* + * Redraw and wait for next update */ RedrawWindow(); if( HasExecute == 1) { @@ -809,13 +809,13 @@ int main(int argc, char *argv[]) { -/* - * ParseCMDLine() +/* + * ParseCMDLine() */ void ParseCMDLine(int argc, char *argv[]) { int i; - + for (i = 1; i < argc; i++) { if (!strcmp(argv[i], "-display")){ @@ -942,8 +942,8 @@ int i; } } - - if (!ShowSeconds && !UseArial && !UseJazzPoster + + if (!ShowSeconds && !UseArial && !UseJazzPoster && !UseComicSans && !UseLuggerbug) UseTekton = 1; @@ -1132,7 +1132,7 @@ int LoadLayoutInfo(void) { return (-1); } - + groups = kb_desc->ctrls->num_groups; /* printf("You have configured %u keyboard groups.\n", groups); printf("Your keyboard have following groups:\n"); diff --git a/wmcalclockkbd/src/wmCalClockKbd.1 b/wmcalclockkbd/src/wmCalClockKbd.1 index 109aa4c..2d8fb6a 100644 --- a/wmcalclockkbd/src/wmCalClockKbd.1 +++ b/wmcalclockkbd/src/wmCalClockKbd.1 @@ -1,4 +1,4 @@ -.TH WMCALCLOCK 1 "12 September 2003" +.TH WMCALCLOCK 1 "12 September 2003" .SH NAME WMCALCLOCK \- Dockable Calendar Clock Keyboard Indicator .SH SYNOPSIS @@ -6,7 +6,7 @@ WMCALCLOCK \- Dockable Calendar Clock Keyboard Indicator [-h] [-display ] [-b ] [-e ] [-24] [-s] [-S] [-L ] [-l] [-tc ] [-bc ] [-tekton] [-comicsans] [-arial] [-luggerbug] [-jazz] [-kb ] [-kbt <0.0-1.0>] .SH DESCRIPTION .PP -wmCalClock is a simple Calendar Clock with anti-aliased text and drop-shadows, which can also indicate your keyboard group +wmCalClock is a simple Calendar Clock with anti-aliased text and drop-shadows, which can also indicate your keyboard group .SH OPTIONS .TP .B \-h @@ -19,31 +19,31 @@ Use an alternate X Display. Beep on the hour with specified volume (between -100 and 100). .TP .B \-e -Command to execute via double click of mouse button 1. (Use quotes if your command +Command to execute via double click of mouse button 1. (Use quotes if your command has white space in it). .TP .B \-24 Show time in 24-hour format instead of default 12-hour AM/PM format. .TP .B \-s -Show Greenwich Mean Sidereal Time (GMST) in 24-hour format. +Show Greenwich Mean Sidereal Time (GMST) in 24-hour format. .TP .B \-S Dont show seconds. .TP .B \-L -Show Local Sidereal Time (LST) in 24-hour format. Longitude is in degrees +Show Local Sidereal Time (LST) in 24-hour format. Longitude is in degrees (- for West + for East). .TP -.B \-l +.B \-l Force use of lower color pixmap to conserve colors. On displays with <= 8 bits, the low color Pixmap will always be used. .TP .B \-tc -Change color of time-field digits. +Change color of time-field digits. .TP .B \-bc -Change color of time-field background. +Change color of time-field background. .TP .B \-tekton Use the Tekton font for time field. diff --git a/wmcalclockkbd/src/wmcalclock.patch b/wmcalclockkbd/src/wmcalclock.patch index 31db48e..63058e5 100644 --- a/wmcalclockkbd/src/wmcalclock.patch +++ b/wmcalclockkbd/src/wmcalclock.patch @@ -7,8 +7,8 @@ int DblClkDelay; - int HasExecute = 0; /* controls perf optimization */ char ExecuteCommand[1024]; - - + + --- 272,277 ---- *************** *** 451,457 **** @@ -16,20 +16,20 @@ * */ ! if ( HasExecute == 0 || n>10){ - + n = 0; - + --- 450,456 ---- * to catch expose events, etc... * */ ! if (n>10){ - + n = 0; - + *************** *** 722,734 **** - * Redraw and wait for next update + * Redraw and wait for next update */ RedrawWindow(); ! if( HasExecute == 1) { @@ -39,16 +39,16 @@ ! } else { ! usleep( 500000L); ! } - - + + } --- 721,727 ---- - * Redraw and wait for next update + * Redraw and wait for next update */ RedrawWindow(); ! usleep(DELAY); - - + + } *************** *** 817,823 **** @@ -56,15 +56,15 @@ } strcpy(ExecuteCommand, argv[++i]); - HasExecute = 1; - + } else if (!strcmp(argv[i], "-g")){ - + --- 810,815 ---- *************** *** 975,981 **** char Command[512]; - - + + - if( HasExecute == 0) return; /* no command specified. Ignore clicks. */ DblClkDelay = 0; if ((xev->button == Button1) && (xev->type == ButtonPress)){ diff --git a/wmcalclockkbd/src/xutils.c b/wmcalclockkbd/src/xutils.c index 0287328..857bbdc 100644 --- a/wmcalclockkbd/src/xutils.c +++ b/wmcalclockkbd/src/xutils.c @@ -1,10 +1,10 @@ /* * xutils.c - A collection of X-windows utilties for creating WindowMAker - * DockApps. + * DockApps. * * This file contains alot of the lower-level X windows routines. Origins with wmppp * (by Martijn Pieterse (pieterse@xs4all.nl)), but its been hacked up quite a bit - * and passed on from one new DockApp to the next. + * and passed on from one new DockApp to the next. * * * @@ -27,7 +27,7 @@ * * * - */ + */ #include #include #include @@ -43,7 +43,7 @@ /* - * X11 Variables + * X11 Variables */ int x_fd; XSizeHints mysizehints; @@ -105,7 +105,7 @@ static int flush_expose(Window w) { * RedrawWindowXY */ void RedrawWindow(void) { - + flush_expose(iconwin); XCopyArea(display, wmgen.pixmap, iconwin, NormalGC, 0,0, wmgen.attributes.width, wmgen.attributes.height, 0, 0); @@ -115,7 +115,7 @@ void RedrawWindow(void) { } void RedrawWindowXY(int x, int y) { - + flush_expose(iconwin); XCopyArea(display, wmgen.pixmap, iconwin, NormalGC, x,y, wmgen.attributes.width, wmgen.attributes.height, 0, 0); @@ -179,7 +179,7 @@ void initXwindow(int argc, char *argv[]){ /* * openXwindow */ -void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bits, +void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bits, int pixmask_width, int pixmask_height) { unsigned int borderwidth = 1; @@ -201,9 +201,9 @@ void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bit {"Color9", NULL, 0}}; - - /* + + /* * Create Pixmap */ cols[0].pixel = getColor(BackgroundColor, 1.0000, &red, &grn, &blu); @@ -221,9 +221,9 @@ void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bit wmgen.attributes.colorsymbols = cols; wmgen.attributes.exactColors = False; wmgen.attributes.closeness = 40000; - wmgen.attributes.valuemask = XpmReturnPixels | XpmReturnExtensions | XpmColorSymbols + wmgen.attributes.valuemask = XpmReturnPixels | XpmReturnExtensions | XpmColorSymbols | XpmExactColors | XpmCloseness | XpmSize; - if (XpmCreatePixmapFromData(display, Root, pixmap_bytes, + if (XpmCreatePixmapFromData(display, Root, pixmap_bytes, &(wmgen.pixmap), &(wmgen.mask), &(wmgen.attributes)) != XpmSuccess){ fprintf(stderr, "Not enough free colorcells.\n"); exit(1); @@ -232,8 +232,8 @@ void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bit - /* - * Create a window + /* + * Create a window */ mysizehints.flags = USSize | USPosition; mysizehints.x = 0; @@ -247,19 +247,19 @@ void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bit mysizehints.width = 64; mysizehints.height = 64; - + win = XCreateSimpleWindow(display, Root, mysizehints.x, mysizehints.y, mysizehints.width, mysizehints.height, borderwidth, fore_pix, back_pix); - + iconwin = XCreateSimpleWindow(display, win, mysizehints.x, mysizehints.y, mysizehints.width, mysizehints.height, borderwidth, fore_pix, back_pix); - /* - * Activate hints + /* + * Activate hints */ XSetWMNormalHints(display, win, &mysizehints); classHint.res_name = wname; @@ -274,11 +274,11 @@ void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bit * effect. I.e. for some you will need to Grab the focus and then return * it after you are done... */ - XSelectInput(display, win, ButtonPressMask | ExposureMask | ButtonReleaseMask - | PointerMotionMask | StructureNotifyMask | EnterWindowMask | LeaveWindowMask + XSelectInput(display, win, ButtonPressMask | ExposureMask | ButtonReleaseMask + | PointerMotionMask | StructureNotifyMask | EnterWindowMask | LeaveWindowMask | KeyPressMask | KeyReleaseMask); - XSelectInput(display, iconwin, ButtonPressMask | ExposureMask | ButtonReleaseMask - | PointerMotionMask | StructureNotifyMask | EnterWindowMask | LeaveWindowMask + XSelectInput(display, iconwin, ButtonPressMask | ExposureMask | ButtonReleaseMask + | PointerMotionMask | StructureNotifyMask | EnterWindowMask | LeaveWindowMask | KeyPressMask | KeyReleaseMask); @@ -290,8 +290,8 @@ void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bit XSetWMName(display, win, &name); - /* - * Create Graphics Context (GC) for drawing + /* + * Create Graphics Context (GC) for drawing */ gcm = GCForeground | GCBackground | GCGraphicsExposures; gcv.foreground = fore_pix; @@ -337,7 +337,7 @@ unsigned long getColor(char *ColorName, float fac, int *red, int *grn, int *blu) Color.flags = DoRed | DoGreen | DoBlue; XAllocColor(display, Attributes.colormap, &Color); - + *red = Color.red; *grn = Color.green; *blu = Color.blue; @@ -407,7 +407,7 @@ int LoadKbImg(char *names) break; } point = strtok(NULL, ","); - } + } return ((i > KB_MAX_GROUPS) ? KB_MAX_GROUPS : i); @@ -442,7 +442,7 @@ void CreateKbTranImgs(void) } } } - + XDestroyImage(image); } diff --git a/wmcalclockkbd/src/xutils.h b/wmcalclockkbd/src/xutils.h index 2df5c7b..122d15a 100644 --- a/wmcalclockkbd/src/xutils.h +++ b/wmcalclockkbd/src/xutils.h @@ -4,7 +4,7 @@ /* - * Typedefs + * Typedefs */ typedef struct { Pixmap pixmap; @@ -21,7 +21,7 @@ typedef struct { Display *display; Window Root; Window iconwin, win; -int screen; +int screen; int DisplayDepth; @@ -43,7 +43,7 @@ void setMaskXY(int, int); unsigned long getColor(char *, float, int *, int *, int *); unsigned long getBlendedColor(char *, float, int, int, int); void RedrawWindow(void); -int LoadKbImg(char *names); +int LoadKbImg(char *names); void CreateKbTranImgs(void); void ShowGroupImage(int group); diff --git a/wmcp/Makefile b/wmcp/Makefile index f1b9878..7339134 100644 --- a/wmcp/Makefile +++ b/wmcp/Makefile @@ -18,7 +18,7 @@ scalpel: make clean make ${TARGET} -gv: +gv: if [ -e buttons.xpm ]; then rm buttons.xpm; fi if [ -e pushed_buttons.xpm ]; then rm pushed_buttons.xpm; fi if [ -e backdrop.xpm ]; then rm backdrop.xpm; fi @@ -37,5 +37,5 @@ ${TARGET}: ${OBJECTS} gcc -g -o ${TARGET} ${OBJECTS} ${LIBINC} ${LIBS} clean:: - for i in ${OBJECTS}; do if [ -e $$i ] ; then rm $$i; fi; done + for i in ${OBJECTS}; do if [ -e $$i ] ; then rm $$i; fi; done if [ -e ${TARGET} ] ; then rm ${TARGET}; fi diff --git a/wmcp/README b/wmcp/README index 9836bbe..e164031 100644 --- a/wmcp/README +++ b/wmcp/README @@ -4,7 +4,7 @@ wmcp ( Window Maker Crappy Pager ) Version 1.2.8 - Origional Author: + Origional Author: Ben Cohen Contributors: ( ** Thanks alot to them !! ** ) @@ -31,13 +31,13 @@ INSTALL: make gv -- make wmcp using the ghostview style button colors copy wmcp to some directory in your $PATH. - ( ie: cp wmcp /usr/local/bin ) + ( ie: cp wmcp /usr/local/bin ) - type wmcp + type wmcp - Grab the appicon and move it to the dock. + Grab the appicon and move it to the dock. - If make doesn't work, you may need to fiddle with the settings in + If make doesn't work, you may need to fiddle with the settings in the Makefile. Tested on: @@ -51,8 +51,8 @@ INSTALL: USAGE: ------ -usage: wmcp [-g geometry] [-d dpy] [-n workspaces] [-a alt key] [-v] - [-c] [-w i/n/w] [-s y/n] [-x #] [-y #] [-h] +usage: wmcp [-g geometry] [-d dpy] [-n workspaces] [-a alt key] [-v] + [-c] [-w i/n/w] [-s y/n] [-x #] [-y #] [-h] -g geometry: ie: 64x64+10+10 -d dpy: Display. ie: 127.0.0.1:0.0 @@ -61,7 +61,7 @@ usage: wmcp [-g geometry] [-d dpy] [-n workspaces] [-a alt key] [-v] -w i/n/w: Window State: Iconic, Normal, Withdrawn (default Withdrawn) -s y/n: Shaped window: yes or no (default y) -c Sends CTRL + ALT + Key (default only sends ALT + key) --v Verbose. 0=off, 1=on (default 0) +-v Verbose. 0=off, 1=on (default 0) -x # Number of buttons on the x-direction (1,2,3 or 4) -y # Number of buttons in the y-direction (1,2,3 or 4) -h Help. This screen. @@ -87,12 +87,12 @@ EXAMPLES: 2x3 button grid: wmdl -x 2 -y 3 - + NOTES: ------ -This pager works by sending synthetic ALT + number key press events to the +This pager works by sending synthetic ALT + number key press events to the root window. The "-c" command line switch makes the application send a CNTRL + ALT + number key which might be of use in another window manager. @@ -105,7 +105,7 @@ I don't know of any Window Maker hooks for determining things like how may workspaces are actually in use. If any one know about this stuff, please let me know. -It is very easy to change the look of wmcp by editing the colors in the +It is very easy to change the look of wmcp by editing the colors in the pixmap files. Someday we'll add an official 'skins' ability but for now just edit the xpm files to change the colors etc. @@ -122,7 +122,7 @@ CHANGE LOG: 1.2.8 May 25, 1999 -- Gert Beumer Added -x and -y functionality to configure the amount of buttons. - Changed the rendering of the buttons from the pixmap + Changed the rendering of the buttons from the pixmap (to suport multiple button startup) 1.2.6 Feb 11, 1999 @@ -133,7 +133,7 @@ CHANGE LOG: 1.2.5 Jan 25, 1999 Made buttons flat style ala Ghostview 3.5.8 - + 1.2 Jan 24, 1999 Pushed button images added by Thomas Nemeth @@ -143,7 +143,7 @@ CHANGE LOG: TODO: ----- -Add a simple method for changing 'skins' other than just editing the XPM +Add a simple method for changing 'skins' other than just editing the XPM files by hand. Add catching Window Maker's events to know how to refresh the pager when diff --git a/wmcp/backdrop-gv.xpm b/wmcp/backdrop-gv.xpm index db22109..a392a37 100644 --- a/wmcp/backdrop-gv.xpm +++ b/wmcp/backdrop-gv.xpm @@ -63,13 +63,13 @@ static char *backdrop_xpm[] = { "aaaaaaaaiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii########", "aaaaaaaaiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii########", "aaaaaaaaiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii########", -"########iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii########", -"################################################################", -"################################################################", +"########iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii########", +"################################################################", +"################################################################", +"################################################################", +"################################################################", +"################################################################", +"################################################################", "################################################################", -"################################################################", -"################################################################", -"################################################################", -"################################################################", }; - + diff --git a/wmcp/backdrop-scalpel.xpm b/wmcp/backdrop-scalpel.xpm index 5870d44..defcdf8 100644 --- a/wmcp/backdrop-scalpel.xpm +++ b/wmcp/backdrop-scalpel.xpm @@ -63,13 +63,12 @@ static char *backdrop_xpm[] = { "aaaaaaaaiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii########", "aaaaaaaaiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii########", "aaaaaaaaiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii########", -"########iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii########", -"################################################################", -"################################################################", +"########iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii########", +"################################################################", +"################################################################", +"################################################################", +"################################################################", +"################################################################", +"################################################################", "################################################################", -"################################################################", -"################################################################", -"################################################################", -"################################################################", }; - \ No newline at end of file diff --git a/wmcp/buttons-gv.xpm b/wmcp/buttons-gv.xpm index 6780983..eca3171 100644 --- a/wmcp/buttons-gv.xpm +++ b/wmcp/buttons-gv.xpm @@ -50,7 +50,7 @@ static char *buttons_xpm[] = { "aa#c #ca", "aa#c #ca", "aa#c #ca", -"aa#c #ca", +"aa#c #ca", "aa#c #ca", "aa#c #ca", "aa#c #ca", diff --git a/wmcp/buttons-scalpel.xpm b/wmcp/buttons-scalpel.xpm index dc0e2f8..8d533e2 100644 --- a/wmcp/buttons-scalpel.xpm +++ b/wmcp/buttons-scalpel.xpm @@ -50,7 +50,7 @@ static char *buttons_xpm[] = { "a#c c#a", "a#c c#a", "a#c c#a", -"a#c c#a", +"a#c c#a", "a#c c#a", "a#c c#a", "a#c c#a", diff --git a/wmcp/mask-scalpel.xbm b/wmcp/mask-scalpel.xbm index f7e6334..5968910 100644 --- a/wmcp/mask-scalpel.xbm +++ b/wmcp/mask-scalpel.xbm @@ -11,10 +11,10 @@ static char mask_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, - 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, + 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, + 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, + 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, + 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, diff --git a/wmcp/pushed_buttons-gv.xpm b/wmcp/pushed_buttons-gv.xpm index 94c9c2d..689a184 100644 --- a/wmcp/pushed_buttons-gv.xpm +++ b/wmcp/pushed_buttons-gv.xpm @@ -50,7 +50,7 @@ static char *pushed_buttons_xpm[] = { "aa#c #ca", "aa#c #ca", "aa#c #ca", -"aa#c #ca", +"aa#c #ca", "aa#c #ca", "aa#c #ca", "aa#c #ca", diff --git a/wmcp/pushed_buttons-scalpel.xpm b/wmcp/pushed_buttons-scalpel.xpm index 7f0b2c3..e20558b 100644 --- a/wmcp/pushed_buttons-scalpel.xpm +++ b/wmcp/pushed_buttons-scalpel.xpm @@ -50,7 +50,7 @@ static char *pushed_buttons_xpm[] = { "a#c c#a", "a#c c#a", "a#c c#a", -"a#c c#a", +"a#c c#a", "a#c c#a", "a#c c#a", "a#c c#a", diff --git a/wmcp/wmcp.c b/wmcp/wmcp.c index 1e95241..0028efc 100644 --- a/wmcp/wmcp.c +++ b/wmcp/wmcp.c @@ -1,22 +1,22 @@ /*********************************************************************** - * Code is stol^H^H^H^Hbased on wmppp, wmload, and wmtme + * Code is stol^H^H^H^Hbased on wmppp, wmload, and wmtme * * Author: Ben Cohen * * Contributors: * Thomas Nemeth -- Pushed button highlighting - * Craig Maloney -- CTRL + ALT + key option + * Craig Maloney -- CTRL + ALT + key option * * * This program is distributed under the GPL license. * * * Best viewed with tab = 4 ( in vi set ts=4 ) - * + * ***********************************************************************/ - + #define VERSION "Ver 1.2.8 -- May 25, 1999" @@ -29,7 +29,7 @@ #include #include "backdrop.xpm" -#include "buttons.xpm" +#include "buttons.xpm" #include "pushed_buttons.xpm" #include "mask.xbm" @@ -74,7 +74,7 @@ ButtonArea button_region[16]; XpmIcon template, visible, buttons, pbuttons; -unsigned int control = 0; +unsigned int control = 0; int numb_of_workspaces = 16; /* Number of buttons to display. Initially set high. Changed by @@ -82,7 +82,7 @@ int numb_of_workspaces = 16; /* Number of buttons to display. int N = 1; /* Button number pressed to goto WS */ int B = 1; /* Button number pressed to number WS's */ -int alt_key_type = 1; +int alt_key_type = 1; int border = 5; int Verbose = 0; @@ -113,7 +113,7 @@ void show_usage(); int main( int argc, char ** argv ) { XEvent report; - XGCValues xgcValues; + XGCValues xgcValues; XTextProperty app_name_atom; @@ -150,7 +150,7 @@ int main( int argc, char ** argv ) case 'n': if ( ++i >= argc ) show_usage(); sscanf(argv[i], "%d", &numb_of_workspaces); - if ( Verbose ) + if ( Verbose ) printf("Numb of Workspaces: %d\n", numb_of_workspaces); break; case 's': @@ -178,14 +178,14 @@ int main( int argc, char ** argv ) case 'x': if ( ++i >= argc ) show_usage(); sscanf(argv[i], "%d", &xbut); - if ( xbut < 1 || xbut > MAX_X_BUT ) xbut = 3; - if ( Verbose ) printf("Num X buttons=%d\n", xbut); + if ( xbut < 1 || xbut > MAX_X_BUT ) xbut = 3; + if ( Verbose ) printf("Num X buttons=%d\n", xbut); break; case 'y': if ( ++i >= argc ) show_usage(); sscanf(argv[i], "%d", &ybut); if ( ybut < 1 || ybut > MAX_Y_BUT ) ybut = 3; - if ( Verbose ) printf("Num Y buttons=%d\n", ybut); + if ( Verbose ) printf("Num Y buttons=%d\n", ybut); break; case 'a': if ( ++i >= argc ) show_usage(); @@ -210,7 +210,7 @@ int main( int argc, char ** argv ) if ( (display = XOpenDisplay(Display_str)) == NULL ) { - fprintf(stderr,"Fail: XOpenDisplay for %s\n", Display_str); + fprintf(stderr,"Fail: XOpenDisplay for %s\n", Display_str); exit(-1); } @@ -219,8 +219,8 @@ int main( int argc, char ** argv ) rootwin = RootWindow(display,screen); depth = DefaultDepth(display, screen); - bg_pixel = WhitePixel(display, screen ); - fg_pixel = BlackPixel(display, screen ); + bg_pixel = WhitePixel(display, screen ); + fg_pixel = BlackPixel(display, screen ); @@ -231,19 +231,19 @@ int main( int argc, char ** argv ) /* Parse Geometry string and fill in sizehints fields */ - XWMGeometry(display, screen, - Geometry_str, - NULL, - border, + XWMGeometry(display, screen, + Geometry_str, + NULL, + border, &xsizehints, - &xsizehints.x, + &xsizehints.x, &xsizehints.y, &xsizehints.width, - &xsizehints.height, + &xsizehints.height, &dummy); - if ( (win = XCreateSimpleWindow( + if ( (win = XCreateSimpleWindow( display, rootwin, xsizehints.x, @@ -252,11 +252,11 @@ int main( int argc, char ** argv ) xsizehints.height, border, fg_pixel, bg_pixel) ) == 0 ) { - fprintf(stderr,"Fail: XCreateSimpleWindow\n"); + fprintf(stderr,"Fail: XCreateSimpleWindow\n"); exit(-1); } - if ( (iconwin = XCreateSimpleWindow( + if ( (iconwin = XCreateSimpleWindow( display, win, xsizehints.x, @@ -265,7 +265,7 @@ int main( int argc, char ** argv ) xsizehints.height, border, fg_pixel, bg_pixel) ) == 0 ) { - fprintf(stderr,"Fail: XCreateSimpleWindow\n"); + fprintf(stderr,"Fail: XCreateSimpleWindow\n"); exit(-1); } @@ -290,21 +290,21 @@ int main( int argc, char ** argv ) /* Convert in pixmaps from .xpm includes. */ getPixmaps(); - + /* Interclient Communication stuff */ /* Appicons don't work with out this stuff */ xwmhints = XAllocWMHints(); - xwmhints->flags = WindowGroupHint | IconWindowHint | StateHint; + xwmhints->flags = WindowGroupHint | IconWindowHint | StateHint; xwmhints->icon_window = iconwin; xwmhints->window_group = win; xwmhints->initial_state = window_state; XSetWMHints( display, win, xwmhints ); - + xclasshint.res_name = "wmcp"; xclasshint.res_class = "WMcp"; XSetClassHint( display, win, &xclasshint ); @@ -323,17 +323,17 @@ int main( int argc, char ** argv ) exit(-1); } XSetWMName( display, win, &app_name_atom ); - + /* Create Graphic Context */ - - if ( (gc = XCreateGC( + + if ( (gc = XCreateGC( display, win, (GCForeground | GCBackground), &xgcValues)) == NULL ) { - fprintf(stderr,"Fail: XCreateGC\n"); + fprintf(stderr,"Fail: XCreateGC\n"); exit(-1); } @@ -346,16 +346,16 @@ int main( int argc, char ** argv ) XSelectInput( display, win, - ExposureMask | - ButtonPressMask | + ExposureMask | + ButtonPressMask | PointerMotionMask | StructureNotifyMask ); XSelectInput( display, iconwin, - ExposureMask | - ButtonPressMask | + ExposureMask | + ButtonPressMask | PointerMotionMask | StructureNotifyMask ); @@ -363,7 +363,7 @@ int main( int argc, char ** argv ) /* Store the 'state' of the application for restarting */ - XSetCommand( display, win, argv, argc ); + XSetCommand( display, win, argv, argc ); /* Window won't ever show up until it is mapped.. then drawn after a */ @@ -381,22 +381,22 @@ int main( int argc, char ** argv ) case Expose: - if (report.xexpose.count != 0) { + if (report.xexpose.count != 0) { break; } - if ( Verbose ) fprintf(stdout,"Event: Expose\n"); + if ( Verbose ) fprintf(stdout,"Event: Expose\n"); redraw( xbut, ybut ); break; case ConfigureNotify: - if ( Verbose ) fprintf(stdout,"Event: ConfigureNotify\n"); + if ( Verbose ) fprintf(stdout,"Event: ConfigureNotify\n"); redraw( xbut, ybut ); break; case ButtonPress: - if ( Verbose ) + if ( Verbose ) printf ("numb_of_workspaces=%d\n", numb_of_workspaces); switch (report.xbutton.button) { case Button1: @@ -405,9 +405,9 @@ int main( int argc, char ** argv ) switchToWorkspaceN( N ); redraw(xbut, ybut); } - if ( Verbose ) - fprintf(stdout,"Button 1:x=%d y=%d N=%d\n", - report.xbutton.x, report.xbutton.y, N); + if ( Verbose ) + fprintf(stdout,"Button 1:x=%d y=%d N=%d\n", + report.xbutton.x, report.xbutton.y, N); break; case Button2: @@ -417,9 +417,9 @@ int main( int argc, char ** argv ) numb_of_workspaces = B; redraw(xbut, ybut); } - if ( Verbose ) - fprintf(stdout,"Button 2or3:x=%d y=%d B=%d\n", - report.xbutton.x, report.xbutton.y, B); + if ( Verbose ) + fprintf(stdout,"Button 2or3:x=%d y=%d B=%d\n", + report.xbutton.x, report.xbutton.y, B); break; } @@ -427,13 +427,13 @@ int main( int argc, char ** argv ) case DestroyNotify: - if ( Verbose ) + if ( Verbose ) fprintf(stdout, "Bye\n"); XFreeGC(display, gc); XDestroyWindow(display,win); XDestroyWindow(display,iconwin); XCloseDisplay(display); - if ( Verbose ) + if ( Verbose ) fprintf(stdout, "Bye\n"); exit(0); break; @@ -452,7 +452,7 @@ return (0); * * Map the button region coordinates. * - * Draw the appropriate number of buttons on the 'visible' Pixmap + * Draw the appropriate number of buttons on the 'visible' Pixmap * using data from the 'buttons' pixmap. * * Then, copy the 'visible' pixmap to the two windows ( the withdrawn @@ -477,15 +477,15 @@ void redraw( int xbut, int ybut ) ybut_size = 48 / ybut; - XCopyArea( display, - template.pixmap, visible.pixmap, - gc, + XCopyArea( display, + template.pixmap, visible.pixmap, + gc, 0, 0, - template.attributes.width, + template.attributes.width, template.attributes.height, - 0, 0 ); + 0, 0 ); + - for ( j=0; j < ybut; j++ ) { for ( i=0; i < xbut; i++ ) { n = i + j * xbut; @@ -500,7 +500,7 @@ void redraw( int xbut, int ybut ) button_region[n].x = dest_x; button_region[n].y = dest_y; button_region[n].i = dest_x + xbut_size - 1; - button_region[n].j = dest_y + ybut_size - 1; + button_region[n].j = dest_y + ybut_size - 1; /* Copy button images for valid workspaces */ @@ -510,56 +510,56 @@ void redraw( int xbut, int ybut ) /* Draw normal button */ /* Edited by Gert Beumer */ if ( (n + 1) != N ) { - + /* upper left */ XCopyArea( display, - buttons.pixmap, - visible.pixmap, - gc, + buttons.pixmap, + visible.pixmap, + gc, 0,0, step_x, step_y, dest_x, dest_y); /* lowwer left */ XCopyArea( display, - buttons.pixmap, - visible.pixmap, - gc, + buttons.pixmap, + visible.pixmap, + gc, 0,48 - step_y, - step_x, step_y, + step_x, step_y, dest_x, dest_y + step_y); /* lowwer right */ XCopyArea( display, - buttons.pixmap, - visible.pixmap, - gc, + buttons.pixmap, + visible.pixmap, + gc, 48 - step_x,48 - step_y, - step_x, step_y, + step_x, step_y, dest_x + step_x, dest_y + step_y); /* upper right */ XCopyArea( display, - buttons.pixmap, - visible.pixmap, - gc, + buttons.pixmap, + visible.pixmap, + gc, 48 - step_x,0, - step_x, step_y, + step_x, step_y, dest_x + step_x, dest_y); - + /* Draw the numbers */ XCopyArea( display, - buttons.pixmap, - visible.pixmap, - gc, + buttons.pixmap, + visible.pixmap, + gc, n * 5, 48, 5,5, dest_x + (48 - xbut * 5) / (2 * xbut), dest_y + (48 - ybut * 5) / (2 * ybut)); } - + /* Draw pushed button */ /* Added by Thomas Nemeth, Edited by Gert Beumer */ if ( (n + 1) == N ) { @@ -567,46 +567,46 @@ void redraw( int xbut, int ybut ) /* upper left */ XCopyArea( display, - pbuttons.pixmap, - visible.pixmap, - gc, + pbuttons.pixmap, + visible.pixmap, + gc, 0,0, step_x, step_y, dest_x, dest_y); /* lowwer left */ XCopyArea( display, - pbuttons.pixmap, - visible.pixmap, - gc, + pbuttons.pixmap, + visible.pixmap, + gc, 0,48 - step_y, - step_x, step_y, + step_x, step_y, dest_x, dest_y + step_y); /* lowwer right */ XCopyArea( display, - pbuttons.pixmap, - visible.pixmap, - gc, + pbuttons.pixmap, + visible.pixmap, + gc, 48 - step_x,48 - step_y, - step_x, step_y, + step_x, step_y, dest_x + step_x, dest_y + step_y); /* upper right */ XCopyArea( display, - pbuttons.pixmap, - visible.pixmap, - gc, + pbuttons.pixmap, + visible.pixmap, + gc, 48 - step_x,0, - step_x, step_y, + step_x, step_y, dest_x + step_x, dest_y); - + /* Draw the numbers */ XCopyArea( display, - pbuttons.pixmap, - visible.pixmap, - gc, + pbuttons.pixmap, + visible.pixmap, + gc, n * 5, 48, 5,5, @@ -619,25 +619,25 @@ void redraw( int xbut, int ybut ) } } - flush_expose( win ); - XCopyArea( display, - visible.pixmap, win, gc, + flush_expose( win ); + XCopyArea( display, + visible.pixmap, win, gc, 0, 0, - visible.attributes.width, + visible.attributes.width, visible.attributes.height, - 0, 0 ); + 0, 0 ); - flush_expose( iconwin ); - XCopyArea( display, - visible.pixmap, iconwin, gc, + flush_expose( iconwin ); + XCopyArea( display, + visible.pixmap, iconwin, gc, 0, 0, - visible.attributes.width, + visible.attributes.width, visible.attributes.height, 0, 0 ); - if ( Verbose ) - fprintf(stdout,"In Redraw()\n"); + if ( Verbose ) + fprintf(stdout,"In Redraw()\n"); } @@ -651,7 +651,7 @@ void redraw( int xbut, int ybut ) * be visible ( drawn ). Return -1 if no button match. * ***********************************************************************/ - + int whichButton( int x, int y, int xbut, int ybut ) { int index; @@ -674,7 +674,7 @@ int whichButton( int x, int y, int xbut, int ybut ) /*********************************************************************** * switchToWorkspaceN() * - * Send the Synthetic Key Press event with the appropriate + * Send the Synthetic Key Press event with the appropriate * [ meta key + 1-4 key ] combo. Alt seems to usualy be Mod1Mask. * ***********************************************************************/ @@ -685,7 +685,7 @@ void switchToWorkspaceN( int workspace ) { sendEvent.xkey.type = KeyPress; sendEvent.xkey.window = rootwin; - sendEvent.xkey.root = rootwin; + sendEvent.xkey.root = rootwin; sendEvent.xkey.subwindow = 0x0; switch ( alt_key_type ) { case 1: @@ -712,9 +712,9 @@ void switchToWorkspaceN( int workspace ) { /*********************************************************************** * getPixmaps - * + * * Load XPM data into X Pixmaps. - * + * * Pixmap template contains the untouched window backdrop image. * Pixmap visible is the template pixmap with buttons drawn on it. * -- what is seen by the user. @@ -736,40 +736,40 @@ void getPixmaps() rootwin, backdrop_xpm, &template.pixmap, - &template.mask, + &template.mask, &template.attributes) != XpmSuccess ) { fprintf(stderr, "Can't Create 'template' Pixmap"); exit(1); } /* Visible Pixmap. Copied from template Pixmap and then drawn to. */ - if ( XpmCreatePixmapFromData( display, - rootwin, + if ( XpmCreatePixmapFromData( display, + rootwin, backdrop_xpm, &visible.pixmap, - &visible.mask, + &visible.mask, &visible.attributes) != XpmSuccess ) { fprintf(stderr, "Can't Create 'visible' Pixmap"); exit(1); } /* Buttons Pixmap. */ - if ( XpmCreatePixmapFromData( display, + if ( XpmCreatePixmapFromData( display, rootwin, buttons_xpm, &buttons.pixmap, - &buttons.mask, + &buttons.mask, &buttons.attributes) != XpmSuccess ) { fprintf(stderr, "Can't Create 'buttons' Pixmap"); exit(1); } /* Pushed Buttons Pixmap. */ - if ( XpmCreatePixmapFromData( display, + if ( XpmCreatePixmapFromData( display, rootwin, pushed_buttons_xpm, &pbuttons.pixmap, - &pbuttons.mask, + &pbuttons.mask, &pbuttons.attributes) != XpmSuccess ) { fprintf(stderr, "Can't Create 'pbuttons' Pixmap"); exit(1); diff --git a/wmdonkeymon/README b/wmdonkeymon/README index 29bb2a0..fdfd546 100644 --- a/wmdonkeymon/README +++ b/wmdonkeymon/README @@ -1,7 +1,7 @@ -wmdonkeymon-0.9 +wmdonkeymon-0.9 -------------------------------------------------------------- Authors...: Marcelo Morgade (marcelomorgade@ig.com.br) - + Description -------------------------------------------------------------- @@ -11,7 +11,7 @@ Click on a file name to show details. Click again to return to list. Plz, don't hack uploads ... -wmisdnmon is being developped on a machine running +wmisdnmon is being developped on a machine running Conectiva Linux 7.0 (Brazilian RedHat like distro) Files @@ -21,19 +21,19 @@ INSTALL Installation instructions. BUGS Things you don't want to know ;-) COPYING GNU General Public License Version 2. TODO FFF (Features For the Future). - + Bugs -------------------------------------------------------------- -If you discover any bugs in this software, please send a +If you discover any bugs in this software, please send a bugreport to marcelomorgade@ig.com.br and describe the problem as detailed as you can. Copyright -------------------------------------------------------------- -wmdonkeymon is copyright (c) 2002 by Marcelo Morgade and -licensed through the GNU General Public License. +wmdonkeymon is copyright (c) 2002 by Marcelo Morgade and +licensed through the GNU General Public License. Read the COPYING file for the complete GNU license. diff --git a/wmdonkeymon/wmdonkeymon/wmdonkeymon.c b/wmdonkeymon/wmdonkeymon/wmdonkeymon.c index a6314a0..6eeeda1 100644 --- a/wmdonkeymon/wmdonkeymon/wmdonkeymon.c +++ b/wmdonkeymon/wmdonkeymon/wmdonkeymon.c @@ -2,10 +2,10 @@ /* * * wmdonkeymon 0.9 (C) 2002 Marcelo Burgos Morgade Cortizo (marcelomorgade@ig.com.br) - * + * * - Show status of edonkey downloads based on '*.part.met' files - * - * + * + * * */ @@ -23,7 +23,7 @@ #include "../wmgeneral/wmgeneral.h" #include "wmdonkeymon_master.xpm" #include "wmdonkeymon_mask.xbm" - + #define SLOT_SIZE 52 #define REF_RATE 5 @@ -138,13 +138,13 @@ int main(int argc, char *argv[]) } } if (!tmpdir) { usage(); exit(-1);} - + openXwindow(argc, argv, wmdonkeymon_master_xpm, wmdonkeymon_mask_bits, wmdonkeymon_mask_width, wmdonkeymon_mask_height); copyXPMArea(5,60,52,54,5,3); RedrawWindow(); splash(); - + r = 0; while (1) { if (!r) { @@ -155,7 +155,7 @@ int main(int argc, char *argv[]) long int fileSize=0, num =0; char nvalue[516],value[516]; j =0; - metnum=0; + metnum=0; // Search for files in temp directory ls = scandir(tmpdir, &namelist, 0, alphasort); if (ls < 0){ @@ -182,37 +182,37 @@ int main(int argc, char *argv[]) if(debug)printf("opening %s\n",buf); if ( (met = fopen(buf,"rb")) != NULL) {} else {printf("Nada\n");}; - + // Version i += fread(buf,1,1,met); if(debug){ printf("Version: %x\n",buf[0]); } - + // Date ?? i += fread(buf,1,4,met); if(debug) { printf("Date: %x %x %x %x \n",buf[0],buf[1],buf[2],buf[3]); } - + // Hash i += fread(buf,1,16,met); if(debug){ printf("Hash: "); for (j=0;j<16;j++) printf("%x ",buf[j]); printf("\n"); } - - + + // Partial Hashes i += fread(buf,1,2,met); memcpy(&j,buf,2); if(debug) printf("Num of Hashes: %d\n",j); - + // Hashes for (i=0;i1024){s/=1024;sk++;} c=files[selected].copied; while (c>1024){c/=1024;ck++;} - + sprintf(out,"%ld%c/%ld%c",c,unit[ck],s,unit[sk]); showString(out,4); sprintf(out,"%s",files[selected].type); showString(out,5); - + // ************** // Donwload Rate // Don't work unless edonkey update met files more frequently - // + // // s = (files[selected].copied) - (files[selected].lastsize); // sprintf(out,"%ld B/S",(s/REF_RATE)); // showString(out,8); //************************ - //STATUS + //STATUS //status tag is always "Looking..." :( // - //getStatus(files[selected].status,out); + //getStatus(files[selected].status,out); //showString(out,9); sprintf(out,"%.3f%%", (( 1.0 * files[selected].copied / files[selected].size))*100); showString(out,8); - + copyXPMArea(66,colord,52,5,5,11); for (i=0; i < files[selected].gapnum ; i++) { copyXPMArea(66,colorg,files[selected].gappos[i][1]-files[selected].gappos[i][0],5,files[selected].gappos[i][0]+5 ,11); @@ -406,7 +406,7 @@ int main(int argc, char *argv[]) sleep(1); r++; if (r==REF_RATE) r=0; - + } } @@ -444,15 +444,15 @@ void strcaseup(char * str){ } void showString(char * buf, int row){ - int i; + int i; strcaseup(buf); for (i=0; buf[i] && i<10;i++){ if (buf[i]>='0' && buf[i]<='9') copyXPMArea(xpos[buf[i]-18],ypos[buf[i]-18],5,5,(i+1)*5,(row*5)); else if((buf[i]>='A' && buf[i]<='Z')) copyXPMArea(xpos[buf[i]-65],ypos[buf[i]-65],5,5,(i+1)*5,(row*5)); else if((buf[i]==' ')) copyXPMArea(66,44,5,5,(i+1)*5,(row*5)); - else if((buf[i]=='/')) copyXPMArea(76,24,5,5,(i+1)*5,(row*5)); - else if((buf[i]=='.')) copyXPMArea(91,24,5,5,(i+1)*5,(row*5)); - else if((buf[i]=='%')) copyXPMArea(106,24,5,5,(i+1)*5,(row*5)); + else if((buf[i]=='/')) copyXPMArea(76,24,5,5,(i+1)*5,(row*5)); + else if((buf[i]=='.')) copyXPMArea(91,24,5,5,(i+1)*5,(row*5)); + else if((buf[i]=='%')) copyXPMArea(106,24,5,5,(i+1)*5,(row*5)); else copyXPMArea(xpos[28],ypos[28],5,5,(i+1)*5,(row*5)); } } @@ -469,11 +469,11 @@ void splash(){ char * s= ".WMDONKEY."; while (i<4){ RedrawWindow(); - showString(s,1); + showString(s,1); copyXPMArea(70,47,47,19,9,20); RedrawWindow(); sleep(1); i++; } - + } diff --git a/wmdonkeymon/wmgeneral/list.c b/wmdonkeymon/wmgeneral/list.c index f804b2c..d9f7329 100644 --- a/wmdonkeymon/wmgeneral/list.c +++ b/wmdonkeymon/wmgeneral/list.c @@ -1,11 +1,11 @@ -/* Generic single linked list to keep various information +/* Generic single linked list to keep various information Copyright (C) 1993, 1994 Free Software Foundation, Inc. Author: Kresten Krab Thorup Many modifications by Alfredo K. Kojima - + This file is part of GNU CC. @@ -38,7 +38,7 @@ Boston, MA 02111-1307, USA. */ /* Return a cons cell produced from (head . tail) */ -INLINE LinkedList* +INLINE LinkedList* list_cons(void* head, LinkedList* tail) { LinkedList* cell; @@ -63,7 +63,7 @@ list_length(LinkedList* list) return i; } -/* Return the Nth element of LIST, where N count from zero. If N +/* Return the Nth element of LIST, where N count from zero. If N larger than the list length, NULL is returned */ INLINE void* @@ -84,7 +84,7 @@ list_nth(int index, LinkedList* list) INLINE void list_remove_head(LinkedList** list) { - if (!*list) return; + if (!*list) return; if ((*list)->tail) { LinkedList* tail = (*list)->tail; /* fetch next */ @@ -116,7 +116,7 @@ INLINE LinkedList * list_remove_elem(LinkedList* list, void* elem) { LinkedList *tmp; - + if (list) { if (list->head == elem) { tmp = list->tail; diff --git a/wmdonkeymon/wmgeneral/list.h b/wmdonkeymon/wmgeneral/list.h index af0f22c..be101ef 100644 --- a/wmdonkeymon/wmgeneral/list.h +++ b/wmdonkeymon/wmgeneral/list.h @@ -1,4 +1,4 @@ -/* Generic single linked list to keep various information +/* Generic single linked list to keep various information Copyright (C) 1993, 1994 Free Software Foundation, Inc. Author: Kresten Krab Thorup diff --git a/wmdonkeymon/wmgeneral/misc.c b/wmdonkeymon/wmgeneral/misc.c index 34281e2..c36cdb4 100644 --- a/wmdonkeymon/wmgeneral/misc.c +++ b/wmdonkeymon/wmgeneral/misc.c @@ -1,9 +1,9 @@ /* dock.c- built-in Dock module for WindowMaker - * + * * WindowMaker window manager - * + * * Copyright (c) 1997 Alfredo K. Kojima - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -28,7 +28,7 @@ *---------------------------------------------------------------------- * parse_command-- * Divides a command line into a argv/argc pair. - *---------------------------------------------------------------------- + *---------------------------------------------------------------------- */ #define PRC_ALPHA 0 #define PRC_BLANK 1 @@ -64,11 +64,11 @@ next_token(char *word, char **next) t = ret = malloc(strlen(word)+1); ptr = word; - + state = 0; *t = 0; while (1) { - if (*ptr==0) + if (*ptr==0) ctype = PRC_EOS; else if (*ptr=='\\') ctype = PRC_ESCAPE; @@ -98,12 +98,12 @@ next_token(char *word, char **next) t = strdup(ret); free(ret); - + if (ctype==PRC_EOS) *next = NULL; else *next = ptr; - + return t; } @@ -118,7 +118,7 @@ parse_command(char *command, char ***argv, int *argc) line = command; do { token = next_token(line, &line); - if (token) { + if (token) { list = list_cons(token, list); } } while (token!=NULL && line!=NULL); @@ -141,15 +141,15 @@ execCommand(char *command) int argc; parse_command(command, &argv, &argc); - + if (argv==NULL) { return 0; } - + if ((pid=fork())==0) { char **args; int i; - + args = malloc(sizeof(char*)*(argc+1)); if (!args) exit(10); diff --git a/wmdonkeymon/wmgeneral/wmgeneral.c b/wmdonkeymon/wmgeneral/wmgeneral.c index 8c21d53..96edb9d 100644 --- a/wmdonkeymon/wmgeneral/wmgeneral.c +++ b/wmdonkeymon/wmgeneral/wmgeneral.c @@ -126,7 +126,7 @@ static void GetXPM(XpmIcon *wmgen, char *pixmap_bytes[]) { err = XpmCreatePixmapFromData(display, Root, pixmap_bytes, &(wmgen->pixmap), &(wmgen->mask), &(wmgen->attributes)); - + if (err != XpmSuccess) { fprintf(stderr, "Not enough free colorcells.\n"); exit(1); @@ -173,9 +173,9 @@ static int flush_expose(Window w) { \*******************************************************************************/ void RedrawWindow(void) { - + flush_expose(iconwin); - XCopyArea(display, wmgen.pixmap, iconwin, NormalGC, + XCopyArea(display, wmgen.pixmap, iconwin, NormalGC, 0,0, wmgen.attributes.width, wmgen.attributes.height, 0,0); flush_expose(win); XCopyArea(display, wmgen.pixmap, win, NormalGC, @@ -187,9 +187,9 @@ void RedrawWindow(void) { \*******************************************************************************/ void RedrawWindowXY(int x, int y) { - + flush_expose(iconwin); - XCopyArea(display, wmgen.pixmap, iconwin, NormalGC, + XCopyArea(display, wmgen.pixmap, iconwin, NormalGC, x,y, wmgen.attributes.width, wmgen.attributes.height, 0,0); flush_expose(win); XCopyArea(display, wmgen.pixmap, win, NormalGC, @@ -294,12 +294,12 @@ void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bit int i; for (i=1; argv[i]; i++) { - if (!strcmp(argv[i], "-display")) + if (!strcmp(argv[i], "-display")) display_name = argv[i+1]; } if (!(display = XOpenDisplay(display_name))) { - fprintf(stderr, "%s: can't open display %s\n", + fprintf(stderr, "%s: can't open display %s\n", wname, XDisplayName(display_name)); exit(1); } @@ -324,10 +324,10 @@ void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bit mysizehints.width = 64; mysizehints.height = 64; - + win = XCreateSimpleWindow(display, Root, mysizehints.x, mysizehints.y, mysizehints.width, mysizehints.height, borderwidth, fore_pix, back_pix); - + iconwin = XCreateSimpleWindow(display, win, mysizehints.x, mysizehints.y, mysizehints.width, mysizehints.height, borderwidth, fore_pix, back_pix); @@ -348,7 +348,7 @@ void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bit XSetWMName(display, win, &name); /* Create GC for drawing */ - + gcm = GCForeground | GCBackground | GCGraphicsExposures; gcv.foreground = fore_pix; gcv.background = back_pix; diff --git a/wmdots/wmdots/Makefile b/wmdots/wmdots/Makefile index a1a23a0..18a9caa 100755 --- a/wmdots/wmdots/Makefile +++ b/wmdots/wmdots/Makefile @@ -1,6 +1,6 @@ LIBDIR = -L/usr/X11R6/lib LIBS = -lXpm -lXext -lX11 -OBJS = wmdots.o ../wmgeneral/wmgeneral.o +OBJS = wmdots.o ../wmgeneral/wmgeneral.o .c.o: cc -c -g -O2 -Wall $< -o $*.o @@ -17,7 +17,7 @@ clean:: rm wmdots install:: - cp -f wmdots /usr/local/bin/ - chmod 755 /usr/local/bin/wmdots - chown root:root /usr/local/bin/wmdots + cp -f wmdots /usr/local/bin/ + chmod 755 /usr/local/bin/wmdots + chown root:root /usr/local/bin/wmdots diff --git a/wmdots/wmdots/sintab.c b/wmdots/wmdots/sintab.c index 99d0f40..945d1c5 100644 --- a/wmdots/wmdots/sintab.c +++ b/wmdots/wmdots/sintab.c @@ -21,9 +21,9 @@ short sin_tab[]= 0x3fb1, 0x3fc3, 0x3fd3, 0x3fe1, 0x3fec, 0x3ff4, 0x3ffb, 0x3ffe, 0x3fff, 0x3ffe, 0x3ffb, 0x3ff4, 0x3fec, 0x3fe1, 0x3fd3, 0x3fc3, - 0x3fb1, 0x3f9c, 0x3f84, 0x3f6a, 0x3f4e, 0x3f2f, 0x3f0e, 0x3eeb, - 0x3ec5, 0x3e9c, 0x3e71, 0x3e44, 0x3e14, 0x3de2, 0x3dae, 0x3d77, - 0x3d3e, 0x3d02, 0x3cc5, 0x3c84, 0x3c42, 0x3bfd, 0x3bb6, 0x3b6c, + 0x3fb1, 0x3f9c, 0x3f84, 0x3f6a, 0x3f4e, 0x3f2f, 0x3f0e, 0x3eeb, + 0x3ec5, 0x3e9c, 0x3e71, 0x3e44, 0x3e14, 0x3de2, 0x3dae, 0x3d77, + 0x3d3e, 0x3d02, 0x3cc5, 0x3c84, 0x3c42, 0x3bfd, 0x3bb6, 0x3b6c, 0x3b20, 0x3ad2, 0x3a82, 0x3a2f, 0x39da, 0x3983, 0x392a, 0x38cf, 0x3871, 0x3811, 0x37af, 0x374b, 0x36e5, 0x367c, 0x3612, 0x35a5, 0x3536, 0x34c6, 0x3453, 0x33de, 0x3367, 0x32ee, 0x3274, 0x31f7, diff --git a/wmdots/wmdots/wmdots.c b/wmdots/wmdots/wmdots.c index 9de33d1..aff6709 100644 --- a/wmdots/wmdots/wmdots.c +++ b/wmdots/wmdots/wmdots.c @@ -195,24 +195,24 @@ xyz square[]= xyz cross[]= { - {0x00,0x00,0x19}, {0x00,0x05,0x19}, {0x00,0x14,0x01}, {0x00,0x32,0x00}, - {0x00,0x7D,0x00}, {0x00,0xC9,0x00}, {0x01,0x5F,0x01}, {0x01,0xAB,0x01}, - {0x01,0xF6,0x01}, {0x02,0x41,0x02}, {0x02,0x8D,0x02}, {0x02,0xD8,0x02}, - {0x03,0x23,0x03}, {0x03,0x05,0x04}, {0x03,0x6F,0x03}, {0x03,0xBA,0x03}, + {0x00,0x00,0x19}, {0x00,0x05,0x19}, {0x00,0x14,0x01}, {0x00,0x32,0x00}, + {0x00,0x7D,0x00}, {0x00,0xC9,0x00}, {0x01,0x5F,0x01}, {0x01,0xAB,0x01}, + {0x01,0xF6,0x01}, {0x02,0x41,0x02}, {0x02,0x8D,0x02}, {0x02,0xD8,0x02}, + {0x03,0x23,0x03}, {0x03,0x05,0x04}, {0x03,0x6F,0x03}, {0x03,0xBA,0x03}, {0x04,0x51,0x04}, {0x04,0x9C,0x04}, {0x04,0xE7,0x04}, {0x05,0x13,0x06}, - {0x05,0x32,0x05}, {0x05,0x7D,0x05}, {0x05,0xC8,0x05}, {0x06,0x5E,0x06}, - {0x06,0xA9,0x06}, {0x06,0xF4,0x06}, {0x07,0x3F,0x07}, {0x07,0x8A,0x07}, - {0x07,0xD5,0x07}, {0x08,0x00,0x09}, {0x08,0x20,0x08}, {0x08,0x6B,0x08}, - {0x08,0xB5,0x08}, {0x09,0x4B,0x09}, {0x09,0x95,0x09}, {0x09,0xE0,0x09}, + {0x05,0x32,0x05}, {0x05,0x7D,0x05}, {0x05,0xC8,0x05}, {0x06,0x5E,0x06}, + {0x06,0xA9,0x06}, {0x06,0xF4,0x06}, {0x07,0x3F,0x07}, {0x07,0x8A,0x07}, + {0x07,0xD5,0x07}, {0x08,0x00,0x09}, {0x08,0x20,0x08}, {0x08,0x6B,0x08}, + {0x08,0xB5,0x08}, {0x09,0x4B,0x09}, {0x09,0x95,0x09}, {0x09,0xE0,0x09}, {0x0A,0x09,0x0B}, {0x0A,0x2A,0x0A}, {0x0A,0x75,0x0A}, {0x0A,0xBF,0x0A}, - {0x0B,0x54,0x0B}, {0x0D,0x07,0x26}, {0x0F,0x02,0x28}, {0x19,0x09,0x32}, - {0x1E,0x04,0x37}, {0x22,0x0B,0x3B}, {0x2C,0x06,0x45}, {0x2D,0x01,0x46}, - {0x39,0x08,0x52}, {0x3D,0x03,0x56}, {0x43,0x0A,0x5C}, {0x4B,0x00,0x64}, - {0x4B,0x05,0x64}, {0x58,0x07,0x71}, {0x5B,0x02,0x74}, {0x64,0x09,0x7C}, + {0x0B,0x54,0x0B}, {0x0D,0x07,0x26}, {0x0F,0x02,0x28}, {0x19,0x09,0x32}, + {0x1E,0x04,0x37}, {0x22,0x0B,0x3B}, {0x2C,0x06,0x45}, {0x2D,0x01,0x46}, + {0x39,0x08,0x52}, {0x3D,0x03,0x56}, {0x43,0x0A,0x5C}, {0x4B,0x00,0x64}, + {0x4B,0x05,0x64}, {0x58,0x07,0x71}, {0x5B,0x02,0x74}, {0x64,0x09,0x7C}, {0x84,0x08,0x9C}, {0x88,0x03,0xA1}, {0x8D,0x0A,0xA6}, {0x96,0x00,0xAF}, - {0x96,0x05,0xAF}, {0xA3,0x07,0xBC}, {0xA6,0x02,0xBF}, {0xAE,0x09,0xC7}, - {0xB5,0x04,0xCE}, {0xC2,0x06,0xDB}, {0xC4,0x01,0xDD}, {0xCE,0x08,0xE7}, - {0xD3,0x03,0xEC}, {0xD8,0x0A,0xF1}, {0xE1,0x05,0xFA}, {0xE2,0x00,0xFB}, + {0x96,0x05,0xAF}, {0xA3,0x07,0xBC}, {0xA6,0x02,0xBF}, {0xAE,0x09,0xC7}, + {0xB5,0x04,0xCE}, {0xC2,0x06,0xDB}, {0xC4,0x01,0xDD}, {0xCE,0x08,0xE7}, + {0xD3,0x03,0xEC}, {0xD8,0x0A,0xF1}, {0xE1,0x05,0xFA}, {0xE2,0x00,0xFB}, {0xEE,0x07,0x07}, {0xF1,0x02,0x0A}, {0xF9,0x09,0x11} }; diff --git a/wmdots/wmgeneral/list.c b/wmdots/wmgeneral/list.c index f804b2c..d9f7329 100644 --- a/wmdots/wmgeneral/list.c +++ b/wmdots/wmgeneral/list.c @@ -1,11 +1,11 @@ -/* Generic single linked list to keep various information +/* Generic single linked list to keep various information Copyright (C) 1993, 1994 Free Software Foundation, Inc. Author: Kresten Krab Thorup Many modifications by Alfredo K. Kojima - + This file is part of GNU CC. @@ -38,7 +38,7 @@ Boston, MA 02111-1307, USA. */ /* Return a cons cell produced from (head . tail) */ -INLINE LinkedList* +INLINE LinkedList* list_cons(void* head, LinkedList* tail) { LinkedList* cell; @@ -63,7 +63,7 @@ list_length(LinkedList* list) return i; } -/* Return the Nth element of LIST, where N count from zero. If N +/* Return the Nth element of LIST, where N count from zero. If N larger than the list length, NULL is returned */ INLINE void* @@ -84,7 +84,7 @@ list_nth(int index, LinkedList* list) INLINE void list_remove_head(LinkedList** list) { - if (!*list) return; + if (!*list) return; if ((*list)->tail) { LinkedList* tail = (*list)->tail; /* fetch next */ @@ -116,7 +116,7 @@ INLINE LinkedList * list_remove_elem(LinkedList* list, void* elem) { LinkedList *tmp; - + if (list) { if (list->head == elem) { tmp = list->tail; diff --git a/wmdots/wmgeneral/list.h b/wmdots/wmgeneral/list.h index af0f22c..be101ef 100644 --- a/wmdots/wmgeneral/list.h +++ b/wmdots/wmgeneral/list.h @@ -1,4 +1,4 @@ -/* Generic single linked list to keep various information +/* Generic single linked list to keep various information Copyright (C) 1993, 1994 Free Software Foundation, Inc. Author: Kresten Krab Thorup diff --git a/wmdots/wmgeneral/misc.c b/wmdots/wmgeneral/misc.c index 34281e2..c36cdb4 100644 --- a/wmdots/wmgeneral/misc.c +++ b/wmdots/wmgeneral/misc.c @@ -1,9 +1,9 @@ /* dock.c- built-in Dock module for WindowMaker - * + * * WindowMaker window manager - * + * * Copyright (c) 1997 Alfredo K. Kojima - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -28,7 +28,7 @@ *---------------------------------------------------------------------- * parse_command-- * Divides a command line into a argv/argc pair. - *---------------------------------------------------------------------- + *---------------------------------------------------------------------- */ #define PRC_ALPHA 0 #define PRC_BLANK 1 @@ -64,11 +64,11 @@ next_token(char *word, char **next) t = ret = malloc(strlen(word)+1); ptr = word; - + state = 0; *t = 0; while (1) { - if (*ptr==0) + if (*ptr==0) ctype = PRC_EOS; else if (*ptr=='\\') ctype = PRC_ESCAPE; @@ -98,12 +98,12 @@ next_token(char *word, char **next) t = strdup(ret); free(ret); - + if (ctype==PRC_EOS) *next = NULL; else *next = ptr; - + return t; } @@ -118,7 +118,7 @@ parse_command(char *command, char ***argv, int *argc) line = command; do { token = next_token(line, &line); - if (token) { + if (token) { list = list_cons(token, list); } } while (token!=NULL && line!=NULL); @@ -141,15 +141,15 @@ execCommand(char *command) int argc; parse_command(command, &argv, &argc); - + if (argv==NULL) { return 0; } - + if ((pid=fork())==0) { char **args; int i; - + args = malloc(sizeof(char*)*(argc+1)); if (!args) exit(10); diff --git a/wmdots/wmgeneral/wmgeneral.c b/wmdots/wmgeneral/wmgeneral.c index c7d69ed..d44df39 100644 --- a/wmdots/wmgeneral/wmgeneral.c +++ b/wmdots/wmgeneral/wmgeneral.c @@ -17,7 +17,7 @@ * Now supports >256 colors 11/09/1998 (Martijn Pieterse, pieterse@xs4all.nl) * Removed a bug from parse_rcfile. You could - not use "start" in a command if a label was + not use "start" in a command if a label was also start. * Changed the needed geometry string. We don't use window size, and don't support @@ -175,7 +175,7 @@ static void GetXPM(XpmIcon *wmgen, char *pixmap_bytes[]) { err = XpmCreatePixmapFromData(display, Root, pixmap_bytes, &(wmgen->pixmap), &(wmgen->mask), &(wmgen->attributes)); - + if (err != XpmSuccess) { fprintf(stderr, "Not enough free colorcells.\n"); exit(1); @@ -222,9 +222,9 @@ static int flush_expose(Window w) { \*******************************************************************************/ void RedrawWindow(void) { - + flush_expose(iconwin); - XCopyArea(display, wmgen.pixmap, iconwin, NormalGC, + XCopyArea(display, wmgen.pixmap, iconwin, NormalGC, 0,0, wmgen.attributes.width, wmgen.attributes.height, 0,0); flush_expose(win); XCopyArea(display, wmgen.pixmap, win, NormalGC, @@ -236,9 +236,9 @@ void RedrawWindow(void) { \*******************************************************************************/ void RedrawWindowXY(int x, int y) { - + flush_expose(iconwin); - XCopyArea(display, wmgen.pixmap, iconwin, NormalGC, + XCopyArea(display, wmgen.pixmap, iconwin, NormalGC, x,y, wmgen.attributes.width, wmgen.attributes.height, 0,0); flush_expose(win); XCopyArea(display, wmgen.pixmap, win, NormalGC, @@ -294,7 +294,7 @@ void createXBMfromXPM(char *xbm, char **xpm, int sx, int sy) { unsigned char bwrite; int bcount; int curpixel; - + sscanf(*xpm, "%d %d %d %d", &width, &height, &numcol, &depth); @@ -303,7 +303,7 @@ void createXBMfromXPM(char *xbm, char **xpm, int sx, int sy) { zero <<=8; zero |= xpm[1][k]; } - + for (i=numcol+1; i < numcol+sy+1; i++) { bcount = 0; bwrite = 0; @@ -316,7 +316,7 @@ void createXBMfromXPM(char *xbm, char **xpm, int sx, int sy) { curpixel <<=8; curpixel |= xpm[i][j+k]; } - + if ( curpixel != zero ) { bwrite += 128; } @@ -392,7 +392,7 @@ void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bit } if (!(display = XOpenDisplay(display_name))) { - fprintf(stderr, "%s: can't open display %s\n", + fprintf(stderr, "%s: can't open display %s\n", wname, XDisplayName(display_name)); exit(1); } @@ -417,10 +417,10 @@ void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bit mysizehints.width = 64; mysizehints.height = 64; - + win = XCreateSimpleWindow(display, Root, mysizehints.x, mysizehints.y, mysizehints.width, mysizehints.height, borderwidth, fore_pix, back_pix); - + iconwin = XCreateSimpleWindow(display, win, mysizehints.x, mysizehints.y, mysizehints.width, mysizehints.height, borderwidth, fore_pix, back_pix); @@ -441,7 +441,7 @@ void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bit XSetWMName(display, win, &name); /* Create GC for drawing */ - + gcm = GCForeground | GCBackground | GCGraphicsExposures; gcv.foreground = fore_pix; gcv.background = back_pix; diff --git a/wmglobe/CHANGES b/wmglobe/CHANGES index d7f0554..4f9d4d5 100644 --- a/wmglobe/CHANGES +++ b/wmglobe/CHANGES @@ -11,7 +11,7 @@ VMGlobe - option selection through parameters screens (right button) - approximation of date & time of view point - new default map (bigger, better) - - display of time uses setlocale() + - display of time uses setlocale() - option -dawn value : enhance dawn borderline - option -time : change date displayed - option -nonimap @@ -20,7 +20,7 @@ VMGlobe - modify comportment of -rand option when zooming - change left button comportment : only change longitude - shift+left button : change longitude & latitude - - man page + - man page 0.3.1 released 5/02/99 - option -austral @@ -39,7 +39,7 @@ VMGlobe left click = change longitude middle click = zoom in / zoom out right click = change latitude - - a few hints for compile on *BSD + - a few hints for compile on *BSD 0.1 released 31/12/98 diff --git a/wmglobe/Makefile b/wmglobe/Makefile index b619240..17dd01d 100644 --- a/wmglobe/Makefile +++ b/wmglobe/Makefile @@ -2,7 +2,7 @@ INC = -I/usr/X11R6/include LIBS = -lXext -lX11 -lm -L/usr/X11R6/lib \ -ltiff -lXpm -lpng -lz -ljpeg -lungif -lwraster OBJS = src/wmglobe.o src/rend.o src/wmgutil.o \ - src/sunpos.o src/myconvert.o src/mycontext.o + src/sunpos.o src/myconvert.o src/mycontext.o .c.o : @@ -12,11 +12,11 @@ all: wmglobe clean: rm -f src/*.o wmglobe - + wmglobe : $(OBJS) gcc -O2 -Wall $(OBJS) -o wmglobe $(LIBS) - strip wmglobe + strip wmglobe -install : +install : install wmglobe /usr/local/bin install wmglobe.1 /usr/local/man/man1 diff --git a/wmglobe/README b/wmglobe/README index 1b6370e..05b883c 100644 --- a/wmglobe/README +++ b/wmglobe/README @@ -17,20 +17,20 @@ It's still a beta version... Installation ---------------------------------------- You need WindowMaker to build WMGlobe. WMGlobe needs libwraster to compile, -this lib is built by WindowMaker. No more need at run time if statically +this lib is built by WindowMaker. No more need at run time if statically linked, but then, you need WindowMaker to get the full magic :-) - + tar -xvzf wmglobe-0.5.tar.gz cd wmglobe-0.5 make - - then move wmglobe in /usr/local/bin and man page somewhere or do + + then move wmglobe in /usr/local/bin and man page somewhere or do (as root) : make install -If it doesn't work, look for the graphic libraries. +If it doesn't work, look for the graphic libraries. The Makefile is quite crude... @@ -38,13 +38,13 @@ WMGlobe is developped on Linux (WMaker 0.51.0 and linux 2.0.36/ix86). If you are successful on other platforms, please tell me so. -platforms with successfull built reported : +platforms with successfull built reported : -NetBSD 1.3.2 / SPARC (wmaker 0.20.3) , with Makefile adaptations for libs -Linux 2.0.36 / RedHat 5.1 -Linux 2.0.36 / SuSE 5.3 (wmaker 0.20.3) , -lungif -> -lgif +NetBSD 1.3.2 / SPARC (wmaker 0.20.3) , with Makefile adaptations for libs +Linux 2.0.36 / RedHat 5.1 +Linux 2.0.36 / SuSE 5.3 (wmaker 0.20.3) , -lungif -> -lgif Linux 2.2.0-pre4 / Debian :-) -FreeBSD-3.0 with -ltiff -> -ltiff34 and -lungif -> -lgif +FreeBSD-3.0 with -ltiff -> -ltiff34 and -lungif -> -lgif Solaris 2.6 / Sun Sparc (wmaker 0.20.3) , with Makefile adaptations for libs AIX 4.2.1 / IBM RS/6000-250 (wmaker 0.50.2) @@ -54,46 +54,46 @@ RPM & DEBIAN linux packages coming soon. Or you can directly use the binary. compile time problems : -Xlib.h, Xpm.h ... : -If you compile wmglobe on a computer installed with packages (.rpm), you may +Xlib.h, Xpm.h ... : +If you compile wmglobe on a computer installed with packages (.rpm), you may lack of these header files. Just install the "xxx-dev.rpm" packages for XFree86 and graphics libs, or install a rpm version of wmglobe. libwraster : -WindowMaker 0.20.3 uses a libwraster.a , so if you use it, you can execute -the binary on a computer without WindowMaker on it, and displaying on a +WindowMaker 0.20.3 uses a libwraster.a , so if you use it, you can execute +the binary on a computer without WindowMaker on it, and displaying on a remote computer (this one using WindowMaker). WM 0.51.0 creates a dynamic -libwraster.so, so it's necessary to have it on the computer running wmglobe -if you buit WMGlobe with this one. Both versions of WMGlobe run on WM 0.20.3 +libwraster.so, so it's necessary to have it on the computer running wmglobe +if you buit WMGlobe with this one. Both versions of WMGlobe run on WM 0.20.3 and 0.51.0 -graphic libs : -you can use libgif or libungif. If your version of WindowMaker is built +graphic libs : +you can use libgif or libungif. If your version of WindowMaker is built without support for some graphic type, you don't need it (just remove it -from the makefile). -This problem may happen with RedHat 5.2, if you get this kind of message, +from the makefile). +This problem may happen with RedHat 5.2, if you get this kind of message, just add a libtiff to your system : /usr/local/lib/libwraster.so: undefined reference to `TIFFReadDirectory' ... make: *** [wmglobe] Error 1 -compile time options : +compile time options : You can modify the file wmgoption.h where many options are set up in defines : To disable the builtin default map, just comment out the line in wmgoptions.h : #define DEFMAPOK to supprim the shift+left/left method of rotate earth, uncomment the lines -#define MOUSE_LAT_FULL +#define MOUSE_LAT_FULL you can also suppress some options screen in wmgoption.h -Maps +Maps ---------------------------------------- -Like XGlobe, WMGlobe needs a longitude/latitude map to work. By default, -it uses a low quality built-in map of earth. But you will probably want +Like XGlobe, WMGlobe needs a longitude/latitude map to work. By default, +it uses a low quality built-in map of earth. But you will probably want to use better ones. You can get maps usable with WMGlobe on the net. See the LINKS chapter. @@ -112,37 +112,37 @@ Configuration options ---------------------------------------- Configuration is done through command line options. - + -v version -h short help -zoom zoom_value Value > 1 to magnify the view, value < 1 to lower. - Default : 1.0 + Default : 1.0 -pos latitude long. Initial viewing fixed at this position, don't follow - the sun rotation. Accepted values in the form - 45°12'36 or 45.21 or 45:12:36 + the sun rotation. Accepted values in the form + 45°12'36 or 45.21 or 45:12:36 Default : the initial position is "under" the sun, and the point of view follows the sun - + -rand New random position at every refresh of screen -map map_file Map used for the rendering. Can be JPEG, GIG, XPM - PNM, TIFF but none BMP + PNM, TIFF but none BMP Default : use internal map of earth. - + -nimap night_file Map used for the dark side of the earth. Must be of - the same width x height as the day side map. + the same width x height as the day side map. Default : if the default internal day map is used, use - a default internal night file (see -nonimap option). + a default internal night file (see -nonimap option). If a custom day map is provided, and no night map, the dark side is computed via the -light option. - --nonimap Don't use the default night map. --delay seconds Time in seconds between each calculation of a new +-nonimap Don't use the default night map. + +-delay seconds Time in seconds between each calculation of a new position. Limited to 0.04 at compile time (25 frames - per second should be enough). The sun position move + per second should be enough). The sun position move only once per minute, so if you use wmglobe without -dlong or -accel option, the CPU cost of WMGlobe is *very* low. The use of very low value for -delay plus @@ -150,29 +150,29 @@ Configuration is done through command line options. Default : 1.0 sec. -dlat delta_latitude Move the point of view by delta_lat degrees per second, - with a value of 6 the earth make a full rotation in + with a value of 6 the earth make a full rotation in one minute. The value can be formated as -pos option. Default : 0°0'0 - --dlong delta_long Move the point of view by delta_long degrees per - second. With a value of -0°0'15" the earth make a full - rotation in 24 hours toward the west. By default, + +-dlong delta_long Move the point of view by delta_long degrees per + second. With a value of -0°0'15" the earth make a full + rotation in 24 hours toward the west. By default, -dlong and -dlat are null. If they are used, the view follow their values. Going back to "follow sun" mode in parameters screen put -dlat and -dlong to zero. -light light_value Level of light of the dark side when there is no - night map, from 0 to 1. - Default : 0.25 + night map, from 0 to 1. + Default : 0.25 -dawn dawn_value Level of continuity for dawn limit, from 0 to 1. With a value of 1, the border line between night and day is at maximum contrast. Default : 0.2 --bord border_num 0 1 or 2. There are 3 different borders for the icon. +-bord border_num 0 1 or 2. There are 3 different borders for the icon. Default : 0 - + -accel time_multi Time warp factor. With -accel 24, the sun make a full rotation in one hour (or the earth, I'm not sure). Default : 1.0 @@ -186,11 +186,11 @@ Configuration is done through command line options. -fun dx dy Move the earth image by dx dy pixels in the icon. See puzzle.sh to understand why. --oz Start in "austral" mode (for "down under" people) +-oz Start in "austral" mode (for "down under" people) -d display Select another display --w -shape Useless, since it is set by default (WMaker dockable +-w -shape Useless, since it is set by default (WMaker dockable application) mouse : @@ -203,13 +203,13 @@ right button Displays 7 screens of parameters. On every screen, just clic with left or right button on the figures to change their value. The TIME screen shows an approximation of date and time of the earth zone currently displayed, - using GMT time + longitude offset, it's close to the - real local time by one or two hours. Others options + using GMT time + longitude offset, it's close to the + real local time by one or two hours. Others options don't need more help. Intuitive they said... - -Links : Some sites dealing with WindowMaker + +Links : Some sites dealing with WindowMaker ------------------------------------------- Official Window Maker Website : @@ -254,7 +254,7 @@ Livingearth Inc. has some nice (day and night) images on their web pages. With these you can test the -nightmap option of XEarth. Unfortunately they are pretty low-res (400x200). You can find a higher-resolution (but heavily compressed) version of this -day map at the "Earth View" page: +day map at the "Earth View" page: http://www.fourmilab.ch/cgi-bin/uncgi/Earth @@ -288,7 +288,7 @@ Bugs - if you use the --enable-single-icon compile time option of WindowMaker, you can not display more than one WMGlobe. - WMGlobe hopes that an overflow of a long integer dont generate an error - and that LONG_MAX +1 = LONG_MIN . This happens with high values of -accel + and that LONG_MAX +1 = LONG_MIN . This happens with high values of -accel when the date go over year 2038. The expected result is wmglobe continuing smoothly from 1901. @@ -296,8 +296,8 @@ Bugs License ---------------------------------------- -WMGlobe is Copyright (C) 1998,99 by Jerome Dumonteil and licensed through -the GNU General Public License. +WMGlobe is Copyright (C) 1998,99 by Jerome Dumonteil and licensed through +the GNU General Public License. Read the COPYING file for the complete GNU license. @@ -335,14 +335,14 @@ The code in 'sunpos.cpp' is taken from Xearth by Kirk Lauritz Johnson. The rendering engine is taken from XGlobe by Thorsten Scheuermann XGlobe Homepage: http://www.uni-karlsruhe.de/~uddn/xglobe -Raster graphics library by Alfredo K. Kojima, & stuff of Window Maker +Raster graphics library by Alfredo K. Kojima, & stuff of Window Maker by A. K. Kojima, Dan Pascu, Matthew Hawkins & team Feedback ---------------------------------------- -For your questions, bugs, remarks, please contact our representative on +For your questions, bugs, remarks, please contact our representative on planet Earth : jerome dumonteil diff --git a/wmglobe/puzzle.sh b/wmglobe/puzzle.sh index 1fd1ddd..2790ae8 100755 --- a/wmglobe/puzzle.sh +++ b/wmglobe/puzzle.sh @@ -1,7 +1,7 @@ #!/bin/sh #just for the fun, solve the puzzle and put it on the clip :) -if [ -x ./wmglobe ] +if [ -x ./wmglobe ] then WMG="nice ./wmglobe" else diff --git a/wmglobe/src/mycontext.c b/wmglobe/src/mycontext.c index bf89759..8479d34 100644 --- a/wmglobe/src/mycontext.c +++ b/wmglobe/src/mycontext.c @@ -4,19 +4,19 @@ */ /* context.c - X context management * Raster graphics library - * + * * Copyright (c) 1997 Alfredo K. Kojima - * + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. - * + * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. - * + * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. @@ -31,14 +31,14 @@ * #include * #include * #include - * + * * #include * #include * #include * #include - * + * * #include - * + * * #include "wraster.h" */ @@ -135,7 +135,7 @@ static XColor * colors[i].flags = DoRed | DoGreen | DoBlue; } } - /* try to allocate close values for the colors that couldn't + /* try to allocate close values for the colors that couldn't * be allocated before */ avncolors = (1 << ctx->depth > 256 ? 256 : 1 << ctx->depth); for (i = 0; i < avncolors; i++) @@ -237,7 +237,7 @@ static XColor * #endif } } - /* try to allocate close values for the colors that couldn't + /* try to allocate close values for the colors that couldn't * be allocated before */ avncolors = (1 << ctx->depth > 256 ? 256 : 1 << ctx->depth); for (i = 0; i < avncolors; i++) diff --git a/wmglobe/src/myconvert.c b/wmglobe/src/myconvert.c index bbb906b..d75878a 100644 --- a/wmglobe/src/myconvert.c +++ b/wmglobe/src/myconvert.c @@ -6,18 +6,18 @@ /* convert.c - convert RImage to Pixmap * Raster graphics library * - * Copyright (c) 1997 Alfredo K. Kojima + * Copyright (c) 1997 Alfredo K. Kojima * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. - * + * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. - * + * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. diff --git a/wmglobe/src/rend.c b/wmglobe/src/rend.c index f398fb8..c11f322 100644 --- a/wmglobe/src/rend.c +++ b/wmglobe/src/rend.c @@ -1,16 +1,16 @@ /* WMGlobe 0.5 - All the Earth on a WMaker Icon * copyright (C) 1998,99 Jerome Dumonteil - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. @@ -220,7 +220,7 @@ void renderFrame() RClearImage(small, &noir); /* - * rotation matrix + * rotation matrix */ m11 = cos(v_long); @@ -293,7 +293,7 @@ void renderFrame() wurzel = sqrt(radikand); s1 = (-b_coef + wurzel) / (2. * a); s2 = (-b_coef - wurzel) / (2. * a); - s = (s1 < s2) ? s1 : s2; /* smaller solution belongs to nearer + s = (s1 < s2) ? s1 : s2; /* smaller solution belongs to nearer * intersection */ @@ -381,7 +381,7 @@ void renderFrame() wurzel = sqrt(soluce[px][py][0]); s1 = (-b_coef + wurzel) / (2. * a); s2 = (-b_coef - wurzel) / (2. * a); - s = (s1 < s2) ? s1 : s2; /* smaller solution belongs to nearer + s = (s1 < s2) ? s1 : s2; /* smaller solution belongs to nearer * intersection */ soluce[px][py][1] = s * dir_x; /* sp = camera pos + s*dir */ diff --git a/wmglobe/src/sunpos.c b/wmglobe/src/sunpos.c index e46ee31..7405da5 100644 --- a/wmglobe/src/sunpos.c +++ b/wmglobe/src/sunpos.c @@ -160,10 +160,10 @@ static double sun_ecliptic_longitude(time_t ssue) */ static void ecliptic_to_equatorial(double lambda, double beta, double *alpha, double *delta) /* - * double lambda; ecliptic longitude - * double beta; ecliptic latitude - * double *alpha; (return) right ascension - * double *delta; (return) declination + * double lambda; ecliptic longitude + * double beta; ecliptic latitude + * double *alpha; (return) right ascension + * double *delta; (return) declination */ { double sin_e, cos_e; @@ -183,9 +183,9 @@ static void ecliptic_to_equatorial(double lambda, double beta, double *alpha, do */ static double julian_date(int y, int m, int d) /* - * int y; year (e.g. 19xx) - * int m; month (jan=1, feb=2, ...) - * int d; day of month + * int y; year (e.g. 19xx) + * int m; month (jan=1, feb=2, ...) + * int d; day of month */ { int A, B, C, D; diff --git a/wmglobe/src/wmglobe.c b/wmglobe/src/wmglobe.c index b59eefd..13fc49f 100644 --- a/wmglobe/src/wmglobe.c +++ b/wmglobe/src/wmglobe.c @@ -1,27 +1,27 @@ /* WMGlobe 0.5 - All the Earth on a WMaker Icon * copyright (C) 1998,99 Jerome Dumonteil - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ***************************************************************************/ -/* +/* * I used many functions of wmgeneral.c ("openXwindow") - * for the main function of wmglobe.c + * for the main function of wmglobe.c * wmgeneral.c was taken from wmaker applet wmtune-1.0 : * Author: Martijn Pieterse (pieterse@xs4all.nl) * - * wmglobe.c uses functions of : Xglobe, Xearth, wmgeneral, wmaker/wrlib + * wmglobe.c uses functions of : Xglobe, Xearth, wmgeneral, wmaker/wrlib ***************************************************************************/ #include "wmglobe.h" @@ -125,7 +125,7 @@ int main(int argc, char *argv[]) /* * loading maps ............. - * + * */ if (dayfile != NULL) { diff --git a/wmglobe/src/wmglobe.h b/wmglobe/src/wmglobe.h index 9456f00..e16f4a7 100644 --- a/wmglobe/src/wmglobe.h +++ b/wmglobe/src/wmglobe.h @@ -1,21 +1,21 @@ /* WMGlobe 0.5 - All the Earth on a WMaker Icon * copyright (C) 1998,99 Jerome Dumonteil - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ***************************************************************************/ -/* it uses some functions of : Xglobe, Xearth, wmgeneral, wmaker/wrlib +/* it uses some functions of : Xglobe, Xearth, wmgeneral, wmaker/wrlib ***************************************************************************/ @@ -125,7 +125,7 @@ double delay, time_multi; /* * struct timeval delta_tim, last_tim, next_tim, render_tim, base_tim, * vec_tim; - * + * * time_t beg_time, ini_time,t1901; */ struct timeval tlast, tnext, trend, tdelay, tini, tbase; diff --git a/wmglobe/src/wmgoption.h b/wmglobe/src/wmgoption.h index 35d86b4..3bac381 100644 --- a/wmglobe/src/wmgoption.h +++ b/wmglobe/src/wmgoption.h @@ -1,16 +1,16 @@ /* WMGlobe 0.5 - All the Earth on a WMaker Icon * copyright (C) 1998,99 Jerome Dumonteil - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. @@ -82,6 +82,6 @@ #define DEFAULT_DAWN 0.9 /* change this if not 64x64 icons (not deep tested) you will need to change - the cadrex.xbm too and a few other things for the parameters menus + the cadrex.xbm too and a few other things for the parameters menus --- DIAMETRE must be a multiple of 2 --- */ #define DIAMETRE 64 diff --git a/wmglobe/src/wmgutil.c b/wmglobe/src/wmgutil.c index 8b35888..2686c5c 100644 --- a/wmglobe/src/wmgutil.c +++ b/wmglobe/src/wmgutil.c @@ -1,27 +1,27 @@ /* WMGlobe 0.5 - All the Earth on a WMaker Icon * copyright (C) 1998,99 Jerome Dumonteil - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ***************************************************************************/ -/* +/* * I used many functions of wmgeneral.c ("openXwindow") - * for the main function of wmglobe.c + * for the main function of wmglobe.c * wmgeneral.c was taken from wmaker applet wmtune-1.0 : * Author: Martijn Pieterse (pieterse@xs4all.nl) * - * wmglobe.c uses functions of : Xglobe, Xearth, wmgeneral, wmaker/wrlib + * wmglobe.c uses functions of : Xglobe, Xearth, wmgeneral, wmaker/wrlib ***************************************************************************/ #include "wmglobe.h" @@ -64,7 +64,7 @@ static void move_dlat(int factor); static void move_dlong(int factor); /* ------------------------------------------------------------------------ */ /* - * TIME FUNCTIONS + * TIME FUNCTIONS */ /* ------------------------------------------------------------------------ */ struct timeval diftimev(struct timeval t1, struct timeval t2) @@ -98,7 +98,7 @@ struct timeval getimev() return tv; } /* ------------------------------------------------------------------------ */ -/* +/* * INIT FUNCTIONS * * defaults, commandline @@ -534,7 +534,7 @@ void cmdline(int argc, char *argv[]) /**************************************************************************** * X functions, mouse selection - * + * */ /* ------------------------------------------------------------------------ */ @@ -591,7 +591,7 @@ int CheckMouseRegion(int x, int y) /* ------------------------------------------------------------------------ */ /* * GRAPHIC : pixmap writing of letters & numbers - * + * */ /* ------------------------------------------------------------------------ */ static void chiffre(int ch, int xx, int yy) @@ -1013,7 +1013,7 @@ static void display_pos(double la, double lo) void rotation_terre(int x, int y, int lat_flag) { /* - * earth rotate after (while) a clic + * earth rotate after (while) a clic */ double mx, my; mx = (double) ((double) x - DIAMETRE / 2 + 0.5) / zoom * cos(v_lat) * sens; diff --git a/wmglobe/src/wraster.h b/wmglobe/src/wraster.h index 0f88d46..0e42af5 100644 --- a/wmglobe/src/wraster.h +++ b/wmglobe/src/wraster.h @@ -1,19 +1,19 @@ /* * Raster graphics library - * + * * Copyright (c) 1997, 1998 Alfredo K. Kojima - * + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. - * + * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. - * + * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. @@ -21,15 +21,15 @@ /* * Environment variables: - * + * * WRASTER_GAMMA // * gamma correction value. Must be greater than 0 * Only for PseudoColor visuals. - * + * * Default: * WRASTER_GAMMA 1/1/1 - * - * + * + * * If you want a specific value for a screen, append the screen number * preceded by a hash to the variable name as in * WRASTER_GAMMA#1 diff --git a/wmglobe/src/zapnum.h b/wmglobe/src/zapnum.h index db614ec..7c7a388 100644 --- a/wmglobe/src/zapnum.h +++ b/wmglobe/src/zapnum.h @@ -1,16 +1,16 @@ /* WMGlobe 0.5.pre1 - All the Earth on a WMaker Icon * copyright (C) 1998,99 Jerome Dumonteil - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. diff --git a/wmglobe/wmglobe.1 b/wmglobe/wmglobe.1 index c3aff14..680ffca 100644 --- a/wmglobe/wmglobe.1 +++ b/wmglobe/wmglobe.1 @@ -1,6 +1,6 @@ .TH WMGlobe 1 "fevrier 1999" .SH NAME -WMGlobe - The Whole Earth spinning on you desktop... +WMGlobe - The Whole Earth spinning on you desktop... as a dockable app for WindowMaker .SH SYNOPSIS .B wmglobe @@ -23,9 +23,9 @@ short help Value > 1 to magnify the view, value < 1 to lower. Default: 1.0 .TP .B \-pos \fI latitude longitude\fP -Initial viewing fixed at this position, don't follow +Initial viewing fixed at this position, don't follow the sun rotation. Accepted values in the form 45°12'36 or 45.21 or 45:12:36 . -Default: the initial position is "under" the sun, and +Default: the initial position is "under" the sun, and the point of view follows the sun. .TP .B \-rand @@ -33,48 +33,48 @@ New random position at every refresh of screen. .TP .B \-map \fI map_file\fP Map used for the rendering. Can be JPEG, GIG, XPM -PNM, TIFF but none BMP. +PNM, TIFF but none BMP. Default: use internal map of earth. .TP .B \-nimap \fI night_file\fP Map used for the dark side of the earth. Must be of -the same width x height as the day side map. +the same width x height as the day side map. Default: if the default internal day map is used, use -a default internal night file (see -nonimap option). +a default internal night file (see -nonimap option). If a custom day map is provided, and no night map, the dark side is computed via the -light option. .TP .B \-nonimap -Don't use the default night map. +Don't use the default night map. .TP .B \-delay \fI seconds\fP -Time in seconds between each calculation of a new +Time in seconds between each calculation of a new position. Limited to 0.04 at compile time (25 frames -per second should be enough). The sun position move +per second should be enough). The sun position move only once per minute, so if you use wmglobe without -dlong or -accel option, the CPU cost of WMGlobe is *very* low. The use of very low value for -delay plus --dlong and -accel can be CPU costly (but very nice...). +-dlong and -accel can be CPU costly (but very nice...). Default: 1.0 sec. .TP .B \-dlat \fI delta_latitude\fP Move the point of view by delta_lat degrees per second, -with a value of 6 the earth make a full rotation in +with a value of 6 the earth make a full rotation in one minute. The value can be formated as -pos option. Default: 0°0'0 .TP -.B \-dlong \fI delta_long\fP -Move the point of view by delta_long degrees per -second. With a value of -0°0'15" the earth make a full -rotation in 24 hours toward the west. By default, +.B \-dlong \fI delta_long\fP +Move the point of view by delta_long degrees per +second. With a value of -0°0'15" the earth make a full +rotation in 24 hours toward the west. By default, -dlong and -dlat are null. If they are used, the view follow their values. Going back to "follow sun" mode in parameters screen put -dlat and -dlong to zero. .TP .B \-light \fI light_value\fP Level of light of the dark side when there is no -night map, from 0 to 1. -Default: 0.25 +night map, from 0 to 1. +Default: 0.25 .TP .B \-dawn \fI dawn_value\fP Level of continuity for dawn limit, from 0 to 1. With @@ -83,9 +83,9 @@ at maximum contrast. Default: 0.2 .TP .B \-bord \fI border_num\fP -0 1 or 2. There are 3 different borders for the icon. +0 1 or 2. There are 3 different borders for the icon. Default: 0 -.TP +.TP .B \-accel \fI time_multi\fP Time warp factor. With -accel 24, the sun make a full rotation in one hour (or the earth, I'm not sure). Default: 1.0 @@ -102,13 +102,13 @@ Move the earth image by dx dy pixels in the icon. See puzzle.sh to understand why. .TP .B \-oz -Start in "austral" mode (for "down under" people) +Start in "austral" mode (for "down under" people) .TP .B \-d \fI display\fP Select another display .TP -.B \-w \-shape -Useless, since it is set by default (WMaker dockable +.B \-w \-shape +Useless, since it is set by default (WMaker dockable application) .SH "MOUSE OPTIONS" .TP @@ -124,27 +124,27 @@ Displays 7 screens of parameters. On every screen, just clic with left or right button on the figures to change their value. The TIME screen shows an approximation of date and time of the earth zone currently displayed, -using GMT time + longitude offset, it's close to the -real local time by one or two hours. Others options +using GMT time + longitude offset, it's close to the +real local time by one or two hours. Others options don't need more help. Intuitive they said... .SH "FILES" .TP .B MAPS -Like XGlobe, WMGlobe needs a longitude/latitude map to work. By default, -it uses a low quality built-in map of earth. But you will probably want +Like XGlobe, WMGlobe needs a longitude/latitude map to work. By default, +it uses a low quality built-in map of earth. But you will probably want to use better ones. You can get maps usable with WMGlobe on the net. See the links below. using custom maps: -For the image to be mapped correctly, position 0°North 0°West must be in +For the image to be mapped correctly, position 0°North 0°West must be in the center of the image and the latitude must be linear from 90°N to 90°S. When using a night map, make sure that day and night map have the same dimensions. .TP .B Links: Where to find maps and similar softs -where to find the sources of wmglobe: +where to find the sources of wmglobe: the web page of WMGlobe (made by Sylvestre Taburet): @@ -163,7 +163,7 @@ XGlobe Homepage: (many links to map of earth) -Xearth Homepage: +Xearth Homepage: @@ -181,16 +181,16 @@ The Window Maker User Guide The Window Maker FAQ .SH "AUTHOR" -jerome dumonteil +jerome dumonteil Patches, bug reports, and suggestions are welcome. .SH "CREDITS" -WMGlobe is Copyright (C) 1998,99 by Jerome Dumonteil and licensed through -the GNU General Public License. +WMGlobe is Copyright (C) 1998,99 by Jerome Dumonteil and licensed through +the GNU General Public License. Read the COPYING file for the complete GNU license. -Original idea, tests, logos: +Original idea, tests, logos: Sylvestre Taburet @@ -224,7 +224,7 @@ documentation. The rendering engine is taken from XGlobe by Thorsten Scheuermann XGlobe Homepage: http://www.uni-karlsruhe.de/~uddn/xglobe -Raster graphics library by Alfredo K. Kojima, & stuff of Window Maker +Raster graphics library by Alfredo K. Kojima, & stuff of Window Maker by A. K. Kojima, Dan Pascu, Matthew Hawkins & team @@ -234,7 +234,7 @@ If you use the --enable-single-icon compile time option of WindowMaker, you can not display more than one WMGlobe. WMGlobe hopes that an overflow of a long integer dont generate an error -and that LONG_MAX +1 = LONG_MIN . This happens with high values of -accel +and that LONG_MAX +1 = LONG_MIN . This happens with high values of -accel when the date go over year 2038. The expected result is wmglobe continuing smoothly from 1901. diff --git a/wmgtemp/README b/wmgtemp/README index 9d22f61..eecc284 100644 --- a/wmgtemp/README +++ b/wmgtemp/README @@ -1,7 +1,7 @@ ------------------------------------------------------------------------- You may distribute this program under the terms of the Artistic License. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Artistic @@ -9,8 +9,8 @@ License for more details. ------------------------------------------------------------------------- wmgtemp is a dock app intended for use with WindowMaker. -It displays the CPU and SYS temperatures (both in numerically and -graphically) of motherboards that use the VIA686A chipset. Currently +It displays the CPU and SYS temperatures (both in numerically and +graphically) of motherboards that use the VIA686A chipset. Currently this is the only chipset that is supported but I have the intention of adding support for other chipsets in the future. diff --git a/wmgtemp/TODO b/wmgtemp/TODO index b6b83d9..483e98b 100644 --- a/wmgtemp/TODO +++ b/wmgtemp/TODO @@ -6,9 +6,9 @@ o Put proper installation together. o Add support for more chipsets o Add abitily to change graph types by clicking on graph area. - DONE o Add max reached temps, eg click CPU and temp is displayed in a different - colour and displays the maximum temp.(possibly draws a horizontal line in + colour and displays the maximum temp.(possibly draws a horizontal line in the graph too to indcate where that lies on current graph) - DONE: Simply changes the colour of the temperature value to red. Independant clicking of CPU and SYS temps. - + o Add ability to exec a program when a given temp is reached. - DONE \ No newline at end of file diff --git a/wmgtemp/src/wmgtemp.c b/wmgtemp/src/wmgtemp.c index 6965a08..379917c 100644 --- a/wmgtemp/src/wmgtemp.c +++ b/wmgtemp/src/wmgtemp.c @@ -135,11 +135,11 @@ int main(int argc, char **argv) { if(!process_config(argc, argv)) { exit(-1); } - + if(!init_sensors()) { exit(-1); } - + /* Get the chip name */ name = sensors_get_detected_chips(NULL, &chip_nr); while(name != NULL && chip_found == -1) { @@ -173,7 +173,7 @@ int main(int argc, char **argv) { /* output the name of the sensor if found. */ if(quiet == 0) printf("wmgtemp: Primary Sensor - %s on %s\n", name->prefix, sensors_get_adapter_name(&name->bus)); - + if(swap_types) { if(quiet == 0) printf("wmgtemp: swapping temps\n"); @@ -205,7 +205,7 @@ int main(int argc, char **argv) { AddMouseRegion(4, 10, SYS_YPOS, 28, SYS_YPOS + 7); /* SYS label area */ AddMouseRegion(5, 55, CPU_YPOS, 60, CPU_YPOS + 7); /* CPU C/K/F scale indicator */ AddMouseRegion(6, 55, SYS_YPOS, 60, SYS_YPOS + 7); /* SYS C/K/F scale indicator */ - + // Add blanking of SYS and CPU for chip type. // <<==--- if(!IsOn(SENSOR_DISP, CPU)) { @@ -225,9 +225,9 @@ int main(int argc, char **argv) { do_sensors(0); RedrawWindow(); - + process_xevents(); - + return 0; } @@ -272,7 +272,7 @@ void process_xevents() { XEvent Event; Status ret; time_t lastupdate = 0; - + ret = XInternalConnectionNumbers(display, &xfds, &fdcount); if(!ret) { fdcount = 0; @@ -281,34 +281,34 @@ void process_xevents() { } xfds = NULL; } - + int i; pfds = (struct pollfd*)malloc((fdcount+1)*sizeof(struct pollfd)); if(!pfds) { perror("malloc"); exit(EXIT_FAILURE); } - + for(i=0; i < fdcount; ++i) { pfds[i].fd = xfds[i]; pfds[i].events = POLLIN | POLLPRI; } - + if(xfds) { XFree(xfds); } - + pfds[fdcount].fd = ConnectionNumber(display); pfds[fdcount].events = POLLIN | POLLPRI; - + while(1) { poll(pfds, fdcount + 1, delay * 1000); - + if(time(NULL) - lastupdate >= delay) { lastupdate = time(NULL); do_sensors(0); } - + while(XPending(display)) { XNextEvent(display, &Event); switch(Event.type) { @@ -338,7 +338,7 @@ void process_xevents() { if(IsOn(SENSOR_DISP, HIGH_CPU)) { BitOff(SENSOR_DISP, HIGH_CPU); blank_max(CPU); - } + } else { BitOn(SENSOR_DISP, HIGH_CPU); draw_max(CPU); @@ -350,7 +350,7 @@ void process_xevents() { if(IsOn(SENSOR_DISP, HIGH_SYS)) { BitOff(SENSOR_DISP, HIGH_SYS); blank_max(SYS); - } + } else { BitOn(SENSOR_DISP, HIGH_SYS); draw_max(SYS); @@ -361,7 +361,7 @@ void process_xevents() { case 3: if(SUBFEAT_NUM_CPU) { if(IsOn(SENSOR_DISP, CPU)) { - BitOff(SENSOR_DISP, CPU); + BitOff(SENSOR_DISP, CPU); blank_type(CPU); } else { @@ -378,7 +378,7 @@ void process_xevents() { if(IsOn(SENSOR_DISP, SYS)) { BitOff(SENSOR_DISP, SYS); blank_type(SYS); - } + } else { BitOn(SENSOR_DISP, SYS); draw_type(SYS); @@ -407,7 +407,7 @@ void do_sensors(int val) { update_sensor_data(); update_display(); RedrawWindow(); - + if(execat != 0 && cpu_history[58] >= execat && !execed) { execed = 1; execCommand(exec_app); @@ -428,7 +428,7 @@ void update_sensor_data() { cpu_history[i] = cpu_history[i + 1]; sys_history[i] = sys_history[i + 1]; } - + // Read the new values from the sensors into the temperature arrays. if(IsOn(SENSOR_DISP, SYS)) sensors_get_value(name, SUBFEAT_NUM_SYS, &sys_history[58]); if(IsOn(SENSOR_DISP, CPU)) sensors_get_value(name, SUBFEAT_NUM_CPU, &cpu_history[58]); @@ -451,7 +451,7 @@ void update_display() { // Display warning. draw_warning_lights(cpu_history[58]); - + // ReDraw temperature numbers if(IsOn(SENSOR_DISP, CPU)) { copyXPMArea(78, 65, 5, 7, 34, CPU_YPOS); @@ -471,7 +471,7 @@ void update_display() { for(j = 0; j < 59; j++) { // Clear a line copyXPMArea(65, 0, 1, 39, j + 2, 12); - + if(sys_history[j] < cpu_history[j]) { // Draw the temperatures on the graph. if(IsOn(SENSOR_DISP, CPU)) { @@ -490,7 +490,7 @@ void update_display() { } } } - + // Draw range lines if needed if(range_upper > display_max) { draw_range_line(display_max, range_upper - range_lower, D_MAX); @@ -503,65 +503,65 @@ void update_display() { int recompute_range(double cpu_high, double cpu_low, double sys_high, double sys_low) { short modified = 0; - + if(IsOn(SENSOR_DISP, CPU)) { if(cpu_high > range_upper) { range_upper += range_step; modified = 1; } - if(cpu_low < range_lower) { - range_lower -= range_step; - modified = 1; - } + if(cpu_low < range_lower) { + range_lower -= range_step; + modified = 1; + } } if(IsOn(SENSOR_DISP, SYS)) { if(sys_high > range_upper) { range_upper += range_step; modified = 1; } - if(sys_low < range_lower) { - range_lower -= range_step; - modified = 1; - } + if(sys_low < range_lower) { + range_lower -= range_step; + modified = 1; + } } - + // -------- if(IsOn(SENSOR_DISP, CPU) && IsOn(SENSOR_DISP, SYS)) { - if((cpu_high < (range_upper - range_step) && - sys_high < (range_upper - range_step)) && + if((cpu_high < (range_upper - range_step) && + sys_high < (range_upper - range_step)) && (range_upper - range_step) >= display_max) { range_upper -= range_step; modified = 1; } - if((cpu_low > (range_lower + range_step) && - sys_low > (range_lower + range_step)) && - (range_lower + range_step) <= display_min ) { - range_lower += range_step; - modified = 1; - } + if((cpu_low > (range_lower + range_step) && + sys_low > (range_lower + range_step)) && + (range_lower + range_step) <= display_min ) { + range_lower += range_step; + modified = 1; + } } else if(IsOn(SENSOR_DISP, CPU) && !IsOn(SENSOR_DISP, SYS)) { - if(cpu_high < (range_upper - range_step) && + if(cpu_high < (range_upper - range_step) && (range_upper - range_step) >= display_max) { range_upper -= range_step; modified = 1; - } - if(cpu_low > (range_lower + range_step) && - (range_lower + range_step) <= display_min) { - range_lower += range_step; - modified = 1; - } + } + if(cpu_low > (range_lower + range_step) && + (range_lower + range_step) <= display_min) { + range_lower += range_step; + modified = 1; + } } else if(!IsOn(SENSOR_DISP, CPU) && IsOn(SENSOR_DISP, SYS)) { - if(sys_high < (range_upper - range_step) && + if(sys_high < (range_upper - range_step) && (range_upper - range_step) >= display_max) { range_upper -= range_step; modified = 1; - } - if(sys_low > (range_lower + range_step) && - (range_lower + range_step) <= display_min) { - range_lower += range_step; - modified = 1; + } + if(sys_low > (range_lower + range_step) && + (range_lower + range_step) <= display_min) { + range_lower += range_step; + modified = 1; } } @@ -630,7 +630,7 @@ void draw_temp(short value, int type) { copyXPMArea((digit * 6) + 1, 65, 5, 7, 34, type == CPU ? CPU_YPOS : SYS_YPOS); } } - } + } } @@ -852,7 +852,7 @@ int process_config(int argc, char **argv) { { "sensorconf", &rc_config }, { NULL, NULL } }; - + static struct option long_options[] = { {"graph", required_argument, 0, 'g'}, {"scale", required_argument, 0, 's'}, @@ -872,7 +872,7 @@ int process_config(int argc, char **argv) { {"help", no_argument, 0, 'h'}, {0, 0, 0, 0} }; - + p = getenv("HOME"); strcpy(temp, p); strcat(temp, "/.wmgtemprc"); diff --git a/wmomikuzi/README b/wmomikuzi/README index 28b260a..cf68116 100644 --- a/wmomikuzi/README +++ b/wmomikuzi/README @@ -24,7 +24,7 @@ How I install it? License? ======== - wmomikuzi is based on libdock and other GPL'ed software. + wmomikuzi is based on libdock and other GPL'ed software. This program is distributed under the GPL license. @@ -62,7 +62,7 @@ How do I read the messages? @ @@@@@@@@@ SUE afterwards - @ + @ @@@@@@@ @@@ @ @ @ @@ -71,7 +71,7 @@ How do I read the messages? @ @@@@@@@ KICHI good luck - @ + @ @@@@@ @@@@@ diff --git a/wmomikuzi/wmomikuzi.c b/wmomikuzi/wmomikuzi.c index a4a2474..c49bc5a 100644 --- a/wmomikuzi/wmomikuzi.c +++ b/wmomikuzi/wmomikuzi.c @@ -91,9 +91,9 @@ main(int argc, char **argv) sizeof(options)/sizeof(DAProgramOption), "dockapp that predict your luck", "wmomikuzi 0.122"); - DAInitialize(displayName, "wmomikuzi", 64, 64, argc, argv); + DAInitialize(displayName, "wmomikuzi", 64, 64, argc, argv); pixmap = DAMakePixmap(); - + /* making pixmaps for the panel */ DAMakePixmapFromData(back_xpm, &back_pixmap, &back_mask, &w, &h); DAMakePixmapFromData(button_pressed_xpm, &button_pressed_pixmap, NULL, &w, &h); @@ -118,7 +118,7 @@ main(int argc, char **argv) srand(time(0L) * (getpid())); i = 0; j = rand() / (RAND_MAX / 6 + 1) + 18; - + /* draws the button part */ XCopyArea(DADisplay, back_pixmap, pixmap, gc, 0, 44, 64, 64, 0, 44); @@ -142,7 +142,7 @@ main(int argc, char **argv) XCopyArea(DADisplay, daikyou_pixmap, pixmap, gc, 0, 0, 64, 39, 5, 5); } DASetPixmap(pixmap); - + usleep(USLEEP); /* j is the destination number */ diff --git a/wmswallow/CHANGELOG b/wmswallow/CHANGELOG index 413e394..f0b52c2 100644 --- a/wmswallow/CHANGELOG +++ b/wmswallow/CHANGELOG @@ -2,7 +2,7 @@ Time-stamp: <00/05/15 23:33:49 friedel> (Note: don't get confused, the dates in this file are in german-locale (de_DE), - because i was too lazy to use something else than + because i was too lazy to use something else than ctrl-u meta-! date... but the timestamp is in C locale...) 0.6.1: diff --git a/wmswallow/README b/wmswallow/README index 6faaac0..bdfcbfc 100644 --- a/wmswallow/README +++ b/wmswallow/README @@ -45,13 +45,13 @@ INSTALLATION: and in case you want to delete the Sourcetree, you might want to copy the README to /usr/doc/wmswallow - Now try + Now try wmswallow -h to get a basic idea how it works. USE: ++++ - Then some things you might try out are: + Then some things you might try out are: (i.e. lots of) EXAMPLES: ========= @@ -93,7 +93,7 @@ USE: little annoying, so wmload is a better choice) ------- wmswallow -focus XTerm - (Weeelll... + (Weeelll... 1. wmswallow can swallow apps without starting them 2. it takes the first it gets 3. swallowed apps can take keyboard focus now! (Is that useful? I doubt diff --git a/wmswallow/todo b/wmswallow/todo index f9d251b..fb26bb3 100644 --- a/wmswallow/todo +++ b/wmswallow/todo @@ -58,7 +58,7 @@ TODO: click works only on the surface of the swallowed window: (Obviously, because the rest of the area belongs to the - dock... Or can that be redeemed?) + dock... Or can that be redeemed?) =============================================================================== @@ -79,7 +79,7 @@ DONE: Somehow handle shaped windows (Like xeyes) -> Ok, even resizing works - Option: -updateshape (or similar) for apps that change their shape + Option: -updateshape (or similar) for apps that change their shape (like oclock -transparent) -> is done by default behaviour! :-) @@ -89,8 +89,8 @@ DONE: Better command-line switch handling. Following commandline-switches: -noshape/-shape : Switch shape functionality on or off - -getclick: Define commandline to exec when window is clicked - -geometry: Define geometry of swallowed application! + -getclick: Define commandline to exec when window is clicked + -geometry: Define geometry of swallowed application! (Size is useful, position as well, to adjust asclock) -id: Give Window-id to swallow @@ -103,7 +103,7 @@ DONE: 2 lines...) :-) The currently focused window flickers, when the shape gets updated. - This is especially strong with + This is especially strong with wmswallow xdaliclock xdaliclock -24 -transparent -cycle \ -geometry 61x61 -fn fixed -oink-oink This also interferes with focus, and it can be seen that the shape diff --git a/wmswallow/wmswallow.c b/wmswallow/wmswallow.c index 8de4bd1..b542e94 100644 --- a/wmswallow/wmswallow.c +++ b/wmswallow/wmswallow.c @@ -1,7 +1,7 @@ /* wmswallow.c */ /* #define DEBUG 1 */ - /* Sometimes i want to get quick access to this flag :-)*/ + /* Sometimes i want to get quick access to this flag :-)*/ /* Time-stamp: <00/05/15 23:13:43 friedel> */ @@ -38,7 +38,7 @@ typedef unsigned long Pixel; /* Index into colormap */ /* Now we got rid of that stupid libXpm dependency :-) */ #define WIDTH 55 -#define HEIGHT 57 +#define HEIGHT 57 /* 55x57 seems to be the default size for a WindowMaker dockapp */ /* settable by "-geometry" switch */ @@ -83,7 +83,7 @@ int shape=TRUE; int focus=FALSE; int unmanaged=FALSE; int winid=0; -char *display_name=NULL; +char *display_name=NULL; int main(int argc,char *argv[]) { @@ -110,11 +110,11 @@ int main(int argc,char *argv[]) fflush(stderr); #endif - if (!(dpy = XOpenDisplay(display_name))) { - fprintf(stderr,"wmswallow: can't open display %s\n", - XDisplayName(display_name)); - exit (1); - } + if (!(dpy = XOpenDisplay(display_name))) { + fprintf(stderr,"wmswallow: can't open display %s\n", + XDisplayName(display_name)); + exit (1); + } screen=DefaultScreen(dpy); Root=RootWindow(dpy, screen); @@ -122,7 +122,7 @@ int main(int argc,char *argv[]) if (remainargc>1) { winid=startandfind(remainargc-1, argv+remainarg+1, argv[remainarg]); if (winid==0) { - perror("wmswallow: startandfind failed"); + perror("wmswallow: startandfind failed"); /* Real error handling in execstuff()*/ exit (1); } @@ -137,7 +137,7 @@ int main(int argc,char *argv[]) fore_pix=GetColor("black"); XWMGeometry(dpy, screen, geometry, NULL, (borderwidth =1), &mysizehints, &mysizehints.x, &mysizehints.y, - &mysizehints.width, &mysizehints.height, &i); + &mysizehints.width, &mysizehints.height, &i); mysizehints.width=WIDTH; mysizehints.height=HEIGHT; if (geometry!=NULL) { @@ -145,10 +145,10 @@ int main(int argc,char *argv[]) fprintf(stderr,"Setting geometry to: %s\n",geometry); fflush(stderr); #endif - XParseGeometry(geometry, &mysizehints.x, &mysizehints.y, + XParseGeometry(geometry, &mysizehints.x, &mysizehints.y, &mysizehints.width, &mysizehints.height); } - + win=XCreateSimpleWindow(dpy, Root, mysizehints.x, mysizehints.y, mysizehints.width, mysizehints.height, borderwidth, fore_pix, back_pix); @@ -174,21 +174,21 @@ int main(int argc,char *argv[]) mywmhints.window_group = win; mywmhints.flags = StateHint | IconWindowHint | IconPositionHint | WindowGroupHint; - XSetWMHints(dpy, win, &mywmhints); + XSetWMHints(dpy, win, &mywmhints); XSetCommand(dpy, win, argv, argc); if (winid==0) { swallowed=findnamedwindow(argv[remainarg]); /* Find which window to swallow*/ #ifdef DEBUG - fprintf(stderr,"%s has Window-id 0x%lx\n", argv[remainarg], swallowed); + fprintf(stderr,"%s has Window-id 0x%lx\n", argv[remainarg], swallowed); fflush(stderr); -#endif +#endif } else swallowed=winid; - + /* "Swallow" it */ XReparentWindow(dpy, swallowed, iconwin, 0, 0); if (getclick) { @@ -246,7 +246,7 @@ int main(int argc,char *argv[]) FlushWindow(); XMapRaised(dpy,swallowed); /* the following Produces "focus-flicker" */ - /* XMapSubwindows(dpy,win); */ + /* XMapSubwindows(dpy,win); */ /* XMapWindow(dpy,win); */ } break; @@ -263,13 +263,13 @@ int main(int argc,char *argv[]) case DestroyNotify: XCloseDisplay(dpy); - exit(0); + exit(0); default: #ifdef DEBUG /* fprintf (stderr, "wmswallow: Got Some Other Event\n"); fflush(stderr); */ #endif - break; + break; } } XFlush(dpy); @@ -284,7 +284,7 @@ int main(int argc,char *argv[]) /* attributes.override_redirect=FALSE; */ /* attributes.event_mask=SW_EVENTS|MW_EVENTS; */ /* attributes.do_not_propagate_mask=0; */ - + /* XChangeWindowAttributes(dpy, w, */ /* CWOverrideRedirect|CWEventMask|CWDontPropagate, */ /* &attributes); */ @@ -316,11 +316,11 @@ int sendexpose (Window w) { } void stealshape(Window w) { - XShapeCombineShape (dpy, iconwin, ShapeBounding, 0, 0, w, + XShapeCombineShape (dpy, iconwin, ShapeBounding, 0, 0, w, ShapeBounding, ShapeSet); /* XShapeCombineShape (dpy, win, ShapeBounding, 0, 0, w, */ /* ShapeBounding, ShapeSet); */ - /*Re-read specs! */ + /*Re-read specs! */ /* XShapeCombineShape (dpy, win, ShapeClip, 0, 0, w, */ /* ShapeClip, ShapeSet); */ /* XShapeCombineShape (dpy, iconwin, ShapeClip, 0, 0, w, */ @@ -355,9 +355,9 @@ Pixel GetColor(char *name) XWindowAttributes attributes; XGetWindowAttributes(dpy,Root,&attributes); color.pixel=0; - if (!XParseColor(dpy,attributes.colormap,name,&color)) + if (!XParseColor(dpy,attributes.colormap,name,&color)) nocolor("parse",name); - else if(!XAllocColor (dpy,attributes.colormap,&color)) + else if(!XAllocColor (dpy,attributes.colormap,&color)) nocolor("alloc",name); return color.pixel; } @@ -382,9 +382,9 @@ void usage(char *progname){ " -focus: Window should take focus\n" " -nofocus: Window shouldn't take focus(default)\n" " -managed: Assume window is managed by the\n" - " windowmanager (default)\n" + " windowmanager (default)\n" " -unmanaged: Assume window is not managed by the\n" - " windowmanager\n" + " windowmanager\n" " -getclick : on mouseclick, execute \n" " instead of passing the Event to the\n" " swallowed window.\n" @@ -407,7 +407,7 @@ int parseargs(int argc, char *argv[]){ !strncmp(argv[argnum],"--",2)) { usage(argv[0]); exit(0); - } else if (!strcmp(argv[argnum],"-geometry")|| + } else if (!strcmp(argv[argnum],"-geometry")|| !strcmp(argv[argnum],"-geom")) geometry=argv[++argnum]; else if (!strcmp(argv[argnum],"-display")) @@ -524,13 +524,13 @@ Window startandfind (int argc, char *oldargv[], char* class) { "0x%lx\n", wintmp); fflush(stderr); #endif - + waitformap(winreturn); /* Ok, the window has been created, Reparented by WindowMaker and mapped */ /* What else can we do to make sure the window was created? */ sleep(1); /* doze just a sec, should be more than enough in any case */ - + return winreturn; } @@ -540,12 +540,12 @@ int execstuff (int argc, char *oldargv[]) { int i, success, forked; argv=(char **)malloc((argc+1)*sizeof(char *)); - + for (i=0; i0) { for @@ -638,9 +638,9 @@ Window findnamedwindowacc (char *class, Window window) { int checkwindow (Window window, char *class) { XClassHint class_hints; XTextProperty prop; - + int found=0; - + class_hints.res_name = class_hints.res_class = prop.value =(char *) NULL; /* Check WM_CLASS properties name and class */ @@ -666,7 +666,7 @@ int checkwindow (Window window, char *class) { prop.value); fflush(stderr); #endif - + /* Clean up */ if (prop.value) XFree(prop.value); diff --git a/wmswallow/wmswallow.spec b/wmswallow/wmswallow.spec index 0ba7272..da86b37 100644 --- a/wmswallow/wmswallow.spec +++ b/wmswallow/wmswallow.spec @@ -18,17 +18,17 @@ BuildRoot: /var/tmp/%{name}-root #Patch: %{name}-%{ver}.patch %description - wmswallow was mainly created to swallow coolmail in the WindowMaker dock, but it can - swallow about any X-window you conceive. -- The window may receive mouseclicks, + swallow about any X-window you conceive. +- The window may receive mouseclicks, - for windows that do not get mouseclicks (like xload or xeyes), you can specify a - shell-command to execute on a click. + shell-command to execute on a click. - The geometry for the swallowed app can be specified. Only HEIGHTxWIDTH are used, - however. + however. - Applications can be started on wmswallows commandline. An already running window - can be swallowed, either by name, class or directly by window-id -- The window may receive keyboard-focus, if you specify the "-focus" switch. + can be swallowed, either by name, class or directly by window-id +- The window may receive keyboard-focus, if you specify the "-focus" switch. - Even windows (like xteddy or wine) that hide from the windowmanager can be - swallowed with the -unmanaged switch + swallowed with the -unmanaged switch %changelog %prep diff --git a/wmtetris/README b/wmtetris/README index 96923b7..634da98 100644 --- a/wmtetris/README +++ b/wmtetris/README @@ -16,7 +16,7 @@ property". WMTETRIS IS PROVIDED "AS IS", AND COMES WITH NO WARRANTY WHATSOEVER, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTEES OF NOT MAKING YOU FEEL LIKE A JERK FOR DOWNLOADING CRAPPY SOFTWARE, AND OF NOT CAUSING A -CULT FOLLOWING TO DEVELOP ;-). +CULT FOLLOWING TO DEVELOP ;-). Comments, questions, and psychiatric referrals to srs25@cornell.edu. diff --git a/wmtetris/wmtetris/wmtetris.c b/wmtetris/wmtetris/wmtetris.c index 3d536fc..53f8b33 100644 --- a/wmtetris/wmtetris/wmtetris.c +++ b/wmtetris/wmtetris/wmtetris.c @@ -221,7 +221,7 @@ int main(int argc, char *argv[]) { int which_button(int x, int y) { int i; - + for (i = BUTTONC - 1; i >= 0; i--) { if ((buttons[i][0] <= x && x < buttons[i][2]) && (buttons[i][1] <= y && y < buttons[i][3])) @@ -282,8 +282,8 @@ void full_refresh() { copyXPMArea(0, 64 + BLOCK_SIZE * (board[x][y] - 1), BLOCK_SIZE, BLOCK_SIZE, BOARD_POS_X + BLOCK_SIZE * x, BOARD_POS_Y + BLOCK_SIZE * y); else - copyXPMArea(64 + BOARD_POS_X + BLOCK_SIZE * x, BOARD_POS_Y + BLOCK_SIZE * y, - BLOCK_SIZE, BLOCK_SIZE, + copyXPMArea(64 + BOARD_POS_X + BLOCK_SIZE * x, BOARD_POS_Y + BLOCK_SIZE * y, + BLOCK_SIZE, BLOCK_SIZE, BOARD_POS_X + BLOCK_SIZE * x, BOARD_POS_Y + BLOCK_SIZE * y); } diff --git a/wmthemech/Makefile.in b/wmthemech/Makefile.in index 638a5ef..4ee7b45 100644 --- a/wmthemech/Makefile.in +++ b/wmthemech/Makefile.in @@ -208,7 +208,7 @@ config.h: stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h -$(srcdir)/config.h.in: $(am__configure_deps) +$(srcdir)/config.h.in: $(am__configure_deps) cd $(top_srcdir) && $(AUTOHEADER) rm -f stamp-h1 touch $@ diff --git a/wmthemech/src/Makefile.in b/wmthemech/src/Makefile.in index e790b96..94c44e3 100644 --- a/wmthemech/src/Makefile.in +++ b/wmthemech/src/Makefile.in @@ -195,7 +195,7 @@ uninstall-binPROGRAMS: clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) -wmThemeCh$(EXEEXT): $(wmThemeCh_OBJECTS) $(wmThemeCh_DEPENDENCIES) +wmThemeCh$(EXEEXT): $(wmThemeCh_OBJECTS) $(wmThemeCh_DEPENDENCIES) @rm -f wmThemeCh$(EXEEXT) $(LINK) $(wmThemeCh_LDFLAGS) $(wmThemeCh_OBJECTS) $(wmThemeCh_LDADD) $(LIBS) diff --git a/wmthemech/src/stringlist.c b/wmthemech/src/stringlist.c index 80890d5..4dbd7af 100644 --- a/wmthemech/src/stringlist.c +++ b/wmthemech/src/stringlist.c @@ -21,7 +21,7 @@ create_list () list->item = malloc (BASE_SIZE * sizeof (int) ); list->size = BASE_SIZE; list->used = 0; - + return list; } diff --git a/wmthemech/src/wmThemeCh.c b/wmthemech/src/wmThemeCh.c index 7db9df8..ce2f55d 100644 --- a/wmthemech/src/wmThemeCh.c +++ b/wmthemech/src/wmThemeCh.c @@ -22,8 +22,8 @@ -/* - * Delay between refreshes (in microseconds) +/* + * Delay between refreshes (in microseconds) */ #define DELAY 10000L @@ -311,7 +311,7 @@ theme_specific_cat (char * path, LIST * cat_list) } /* Read "categories" file in path. - * Themes in path and its subdirs are belonging to categories listed + * Themes in path and its subdirs are belonging to categories listed * in that file if these categories are defined by user profile. * Updates cat_list accordingly. */ @@ -487,7 +487,7 @@ BuildDatabase () for (dir_idx=0; dir_idx < 4; dir_idx++) { get_themes ( themes_dir[dir_idx], NULL); - get_wallpapers (wallpapers_dir[dir_idx], NULL); + get_wallpapers (wallpapers_dir[dir_idx], NULL); } return 0; @@ -546,11 +546,11 @@ DrawPixmap (char * XpmFileName) copyXPMArea(4, 4, 56, 56, 4, 4); /* Clear window */ if (havePixmap) { - /* - * free up the colors, if we alloc'd some before + /* + * free up the colors, if we alloc'd some before */ - if (Attributes.nalloc_pixels > 0) - XFreeColors(display, cmap, Attributes.alloc_pixels, + if (Attributes.nalloc_pixels > 0) + XFreeColors(display, cmap, Attributes.alloc_pixels, Attributes.nalloc_pixels, 0); /* * Free last pixmap -- we dont need it anymore... @@ -653,7 +653,7 @@ ChangeTheme () case 1 : val = 0; break; default : fd = open ("/dev/random", O_RDONLY); - + /* We're disallowing "changing" to the same */ read (fd, &val, sizeof (int) ); val = val % (i - 1); @@ -664,7 +664,7 @@ ChangeTheme () } switch ( ( (struct theme *) get_item (cur_cat->themes, val) ) -> type) { - case THEME : + case THEME : sprintf (Command, "setstyle \"%s\"", ( (struct theme *) get_item (cur_cat->themes, val) ) -> path); break; @@ -805,7 +805,7 @@ main (int argc, char *argv[]) } /* TODO : use sigsuspend */ - + while (1) { ProcessXEvents (); delay_timer += DELAY; diff --git a/wmthemech/src/wmgeneral.c b/wmthemech/src/wmgeneral.c index 245e37f..2253f17 100644 --- a/wmthemech/src/wmgeneral.c +++ b/wmthemech/src/wmgeneral.c @@ -123,7 +123,7 @@ static void GetXPM(XpmIcon *wmgen, char *pixmap_bytes[]) { err = XpmCreatePixmapFromData(display, Root, pixmap_bytes, &(wmgen->pixmap), &(wmgen->mask), &(wmgen->attributes)); - + if (err != XpmSuccess) { fprintf(stderr, "Not enough free colorcells.\n"); exit(1); @@ -170,9 +170,9 @@ static int flush_expose(Window w) { \*******************************************************************************/ void RedrawWindow(void) { - + flush_expose(iconwin); - XCopyArea(display, wmgen.pixmap, iconwin, NormalGC, + XCopyArea(display, wmgen.pixmap, iconwin, NormalGC, 0,0, wmgen.attributes.width, wmgen.attributes.height, 0,0); flush_expose(win); XCopyArea(display, wmgen.pixmap, win, NormalGC, @@ -184,9 +184,9 @@ void RedrawWindow(void) { \*******************************************************************************/ void RedrawWindowXY(int x, int y) { - + flush_expose(iconwin); - XCopyArea(display, wmgen.pixmap, iconwin, NormalGC, + XCopyArea(display, wmgen.pixmap, iconwin, NormalGC, x,y, wmgen.attributes.width, wmgen.attributes.height, 0,0); flush_expose(win); XCopyArea(display, wmgen.pixmap, win, NormalGC, @@ -280,12 +280,12 @@ void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bit int i; for (i=1; argv[i]; i++) { - if (!strcmp(argv[i], "-display")) + if (!strcmp(argv[i], "-display")) display_name = argv[i+1]; } if (!(display = XOpenDisplay(display_name))) { - fprintf(stderr, "%s: can't open display %s\n", + fprintf(stderr, "%s: can't open display %s\n", wname, XDisplayName(display_name)); exit(1); } @@ -310,10 +310,10 @@ void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bit mysizehints.width = 64; mysizehints.height = 64; - + win = XCreateSimpleWindow(display, Root, mysizehints.x, mysizehints.y, mysizehints.width, mysizehints.height, borderwidth, fore_pix, back_pix); - + iconwin = XCreateSimpleWindow(display, win, mysizehints.x, mysizehints.y, mysizehints.width, mysizehints.height, borderwidth, fore_pix, back_pix); @@ -334,7 +334,7 @@ void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bit XSetWMName(display, win, &name); /* Create GC for drawing */ - + gcm = GCForeground | GCBackground | GCGraphicsExposures; gcv.foreground = fore_pix; gcv.background = back_pix; diff --git a/wmtunlo/AUTHORS b/wmtunlo/AUTHORS index da628b8..49c2c1f 100644 --- a/wmtunlo/AUTHORS +++ b/wmtunlo/AUTHORS @@ -1,5 +1,5 @@ -Author: +Author: Tomasz Maka Borrowed code: diff --git a/wmtunlo/Changelog b/wmtunlo/Changelog index 5d55040..c53651a 100644 --- a/wmtunlo/Changelog +++ b/wmtunlo/Changelog @@ -1,7 +1,7 @@ 0.1.2 (25-06-2003) * command line options was replaced by a config file - * now, we can run up to 3 programs on double-click + * now, we can run up to 3 programs on double-click (based on patch by Alan Jurgensen) 0.1.1 (14-04-2002) diff --git a/wmtunlo/README b/wmtunlo/README index 722837e..cdf07c6 100644 --- a/wmtunlo/README +++ b/wmtunlo/README @@ -1,5 +1,5 @@ -WMTUNLO +WMTUNLO ======== It is one of the useless dockapp ever made, so use it or not.... @@ -7,7 +7,7 @@ It is one of the useless dockapp ever made, so use it or not.... The configuration file is stored in $HOME/.clay/ directory. There are 8 examples named 'wmtunlorc.example1' thru 'wmtunlorc.example8'. -To test these examples rename selected file to 'wmtunlorc' and put it into +To test these examples rename selected file to 'wmtunlorc' and put it into $HOME/.clay/ directory, then run wmtunlo. You can assign three programs to run when double-click is performed (look at diff --git a/wmtunlo/docklib.c b/wmtunlo/docklib.c index afaf1ca..7d58fae 100644 --- a/wmtunlo/docklib.c +++ b/wmtunlo/docklib.c @@ -3,7 +3,7 @@ /* made from scratch */ /*--------------------------------*/ -/* +/* functions were written by following People: --- linked list @@ -37,7 +37,7 @@ /* Return a cons cell produced from (head . tail) */ -INLINE LinkedList* +INLINE LinkedList* list_cons(void* head, LinkedList* tail) { LinkedList* cell; @@ -62,7 +62,7 @@ list_length(LinkedList* list) return i; } -/* Return the Nth element of LIST, where N count from zero. If N +/* Return the Nth element of LIST, where N count from zero. If N larger than the list length, NULL is returned */ INLINE void* @@ -83,7 +83,7 @@ list_nth(int index, LinkedList* list) INLINE void list_remove_head(LinkedList** list) { - if (!*list) return; + if (!*list) return; if ((*list)->tail) { LinkedList* tail = (*list)->tail; /* fetch next */ @@ -101,7 +101,7 @@ INLINE LinkedList * list_remove_elem(LinkedList* list, void* elem) { LinkedList *tmp; - + if (list) { if (list->head == elem) { tmp = list->tail; @@ -158,7 +158,7 @@ list_mapcar(LinkedList* list, void(*function)(void*)) *---------------------------------------------------------------------- * parse_command-- * Divides a command line into a argv/argc pair. - *---------------------------------------------------------------------- + *---------------------------------------------------------------------- */ #define PRC_ALPHA 0 #define PRC_BLANK 1 @@ -194,11 +194,11 @@ next_token(char *word, char **next) t = ret = malloc(strlen(word)+1); ptr = word; - + state = 0; *t = 0; while (1) { - if (*ptr==0) + if (*ptr==0) ctype = PRC_EOS; else if (*ptr=='\\') ctype = PRC_ESCAPE; @@ -228,12 +228,12 @@ next_token(char *word, char **next) t = strdup(ret); free(ret); - + if (ctype==PRC_EOS) *next = NULL; else *next = ptr; - + return t; } @@ -248,7 +248,7 @@ parse_command(char *command, char ***argv, int *argc) line = command; do { token = next_token(line, &line); - if (token) { + if (token) { list = list_cons(token, list); } } while (token!=NULL && line!=NULL); @@ -271,15 +271,15 @@ execCommand(char *command) int argc; parse_command(command, &argv, &argc); - + if (argv==NULL) { return 0; } - + if ((pid=fork())==0) { char **args; int i; - + args = malloc(sizeof(char*)*(argc+1)); if (!args) exit(10); @@ -385,7 +385,7 @@ static void GetXPM(XpmIcon *wmgen, char *pixmap_bytes[]) { err = XpmCreatePixmapFromData(display, Root, pixmap_bytes, &(wmgen->pixmap), &(wmgen->mask), &(wmgen->attributes)); - + if (err != XpmSuccess) { fprintf(stderr, "Not enough free colorcells.\n"); exit(1); @@ -432,9 +432,9 @@ static int flush_expose(Window w) { \*******************************************************************************/ void RedrawWindow(void) { - + flush_expose(iconwin); - XCopyArea(display, wmgen.pixmap, iconwin, NormalGC, + XCopyArea(display, wmgen.pixmap, iconwin, NormalGC, 0,0, wmgen.attributes.width, wmgen.attributes.height, 0,0); flush_expose(win); XCopyArea(display, wmgen.pixmap, win, NormalGC, @@ -446,9 +446,9 @@ void RedrawWindow(void) { \*******************************************************************************/ void RedrawWindowXY(int x, int y) { - + flush_expose(iconwin); - XCopyArea(display, wmgen.pixmap, iconwin, NormalGC, + XCopyArea(display, wmgen.pixmap, iconwin, NormalGC, x,y, wmgen.attributes.width, wmgen.attributes.height, 0,0); flush_expose(win); XCopyArea(display, wmgen.pixmap, win, NormalGC, @@ -542,12 +542,12 @@ void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bit int i; for (i=1; argv[i]; i++) { - if (!strcmp(argv[i], "-display")) + if (!strcmp(argv[i], "-display")) display_name = argv[i+1]; } if (!(display = XOpenDisplay(display_name))) { - fprintf(stderr, "%s: can't open display %s\n", + fprintf(stderr, "%s: can't open display %s\n", wname, XDisplayName(display_name)); exit(1); } @@ -572,10 +572,10 @@ void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bit mysizehints.width = 64; mysizehints.height = 64; - + win = XCreateSimpleWindow(display, Root, mysizehints.x, mysizehints.y, mysizehints.width, mysizehints.height, borderwidth, fore_pix, back_pix); - + iconwin = XCreateSimpleWindow(display, win, mysizehints.x, mysizehints.y, mysizehints.width, mysizehints.height, borderwidth, fore_pix, back_pix); @@ -596,7 +596,7 @@ void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bit XSetWMName(display, win, &name); /* Create GC for drawing */ - + gcm = GCForeground | GCBackground | GCGraphicsExposures; gcv.foreground = fore_pix; gcv.background = back_pix; @@ -671,7 +671,7 @@ void* p_prefs_openfile (char *filename, int openmode) prefs_filehandle = fopen (filename, "rb"); else if (openmode == P_WRITE) prefs_filehandle = fopen (filename, "wb"); - + return prefs_filehandle; } @@ -724,20 +724,20 @@ static char prfline[MAX_LINE_LEN]; int i; char c; - fseek (prefs_filehandle, 0, SEEK_SET); - + fseek (prefs_filehandle, 0, SEEK_SET); + while (!feof (prefs_filehandle)) { i = 0; while (((c = fgetc (prefs_filehandle)) != crlf_char) && c!= EOF && i < MAX_LINE_LEN) prfline[i++] = c; - + prfline[i] = null_char; - + if (prfline[0] != '#') if (!strncmp (tagname, prfline, strlen (tagname))) break; } - + return prfline; } @@ -753,7 +753,7 @@ int i; if ((valpos = strchr (p_prefs_get_line_with_tag (tagname), '='))) { while((c = valpos[i+1]) != null_char && i < MAX_VALUE_LEN) valuestr[i++] = c; } - + valuestr[i] = null_char; return valuestr; } @@ -802,7 +802,7 @@ int len; (int)(len-maxlength), src); len = maxlength; } - + memcpy(dest, src, len); dest[len] = 0; return dest; @@ -831,7 +831,7 @@ int src_len, dest_len; (int)(src_len + dest_len - maxlength), src); src_len = maxlength - dest_len; } - + memcpy(&dest[dest_len], src, src_len); dest[dest_len + src_len] = 0; return dest; diff --git a/wmtunlo/docklib.h b/wmtunlo/docklib.h index 03d55f9..4057022 100644 --- a/wmtunlo/docklib.h +++ b/wmtunlo/docklib.h @@ -3,7 +3,7 @@ /* made from scratch */ /*--------------------------------*/ -/* +/* functions were written by following People: --- linked list diff --git a/wmtunlo/wmtunlo.c b/wmtunlo/wmtunlo.c index 17ba29f..349b0c6 100644 --- a/wmtunlo/wmtunlo.c +++ b/wmtunlo/wmtunlo.c @@ -88,7 +88,7 @@ unsigned char *Image, *Texture, *Tunnel_map; /* Read preferences */ - wmtunlo_read_prefs(); + wmtunlo_read_prefs(); /* Open window */ openXwindow(argc, argv, dock_master, dock_mask_bits, dock_mask_width, dock_mask_height); @@ -175,7 +175,7 @@ unsigned char *Image, *Texture, *Tunnel_map; px = atan2(yz,xz) * 128.0 / M_PI; result = (int)py * 256 + (int)px; - Tunnel_map[k++]= result&0xff; + Tunnel_map[k++]= result&0xff; Tunnel_map[k++]= result>>8; Tunnel_map[k++]= shade&0xff; } @@ -184,13 +184,13 @@ unsigned char *Image, *Texture, *Tunnel_map; Texture = (unsigned char *)malloc(sizeof(unsigned char)*256*256); for(i=0,q=1;i<256;i+=tex_block_h, q*=-1) - for(j=0,p=q;j<256;j+=tex_block_w, p*=-1) + for(j=0,p=q;j<256;j+=tex_block_w, p*=-1) for(l=0;l0) Texture[(i+l)*256+j+k] = t_color_1; - else + else Texture[(i+l)*256+j+k] = t_color_2; } @@ -331,7 +331,7 @@ void ButtonPressEvent(XButtonEvent *xev){ /*----------------------------------------------------------------------*/ /* Write preferences */ -void wmtunlo_write_prefs(void) +void wmtunlo_write_prefs(void) { if (p_prefs_openfile (p_getfilename_config (".clay", "wmtunlorc"), P_WRITE)) { @@ -362,14 +362,14 @@ void wmtunlo_write_prefs(void) p_prefs_put_string("command3", ClickCommand3); } - + p_prefs_closefile (); } /*----------------------------------------------------------------------*/ /* Read preferences */ -void wmtunlo_read_prefs(void) +void wmtunlo_read_prefs(void) { if (p_prefs_openfile (p_getfilename_config(".clay", "wmtunlorc"), P_READ)) { @@ -398,9 +398,9 @@ void wmtunlo_read_prefs(void) strcpy(ClickCommand1, p_prefs_get_string ("command1")); strcpy(ClickCommand2, p_prefs_get_string ("command2")); strcpy(ClickCommand3, p_prefs_get_string ("command3")); - + p_prefs_closefile (); - + } else { shade_switch = 1; diff --git a/wmwebcam/Makefile b/wmwebcam/Makefile index 09f81b7..321513b 100644 --- a/wmwebcam/Makefile +++ b/wmwebcam/Makefile @@ -1,6 +1,6 @@ CC = gcc CFLAGS = -O2 -Wall -I/usr/X11R6/include -DVIDEO_DEV=\"/dev/video\" -LDFLAGS = +LDFLAGS = LIBS = -L/usr/X11R6/lib -lX11 -lXext -lm -ljpeg OBJS = minirgb.o wmwebcam.o diff --git a/wmwebcam/minirgb.c b/wmwebcam/minirgb.c index 175511a..55971e1 100644 --- a/wmwebcam/minirgb.c +++ b/wmwebcam/minirgb.c @@ -159,7 +159,7 @@ void minirgb_draw(Window drawable, GC gc, int x, int y, int width, } #ifdef VERBOSE printf("minirgb: image %p %dx%d (bpp: %d, bpl: %d)\n", image, width, height, bpp, image->bytes_per_line); -#endif +#endif image->data = malloc(image->bytes_per_line * height); if (!image->data) { fprintf(stderr, "minirgb: allocation error\n"); diff --git a/wmwebcam/wmwebcam-mask.xbm b/wmwebcam/wmwebcam-mask.xbm index 366f5cc..dc52dce 100644 --- a/wmwebcam/wmwebcam-mask.xbm +++ b/wmwebcam/wmwebcam-mask.xbm @@ -1,89 +1,89 @@ #define wmwebcam_mask_width 128 #define wmwebcam_mask_height 64 static char wmwebcam_mask_bits[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; diff --git a/wmwebcam/wmwebcam.c b/wmwebcam/wmwebcam.c index ee166f4..ce97186 100644 --- a/wmwebcam/wmwebcam.c +++ b/wmwebcam/wmwebcam.c @@ -203,11 +203,11 @@ get_image (int dev, int width, int height,int *size) void put_image_jpeg (char *image, int width, int height, int quality) -{ +{ FILE *output; - int y, x, line_width; - JSAMPROW row_ptr[1]; + int y, x, line_width; + JSAMPROW row_ptr[1]; struct jpeg_compress_struct cjpeg; struct jpeg_error_mgr jerr; char *line;