wmappkill: Add version 0.2 to repository.

From
http://www.sourcefiles.org/Utilities/GUI/wmappkill-0.2.tar.gz
This commit is contained in:
Doug Torrance 2016-12-03 16:49:49 -05:00 committed by Carlos R. Mafra
parent be3ddab93d
commit 8d75611daf
9 changed files with 1490 additions and 0 deletions

340
wmappkill/COPYING Normal file
View file

@ -0,0 +1,340 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

10
wmappkill/ChangeLog Normal file
View file

@ -0,0 +1,10 @@
wmAppKill - Changelog
- 12/27/2000 - v0.2
added support for mouse wheel (thanks to Mathieu)
some code cleaning
- 09/28/2000 - v0.1
initial release

12
wmappkill/INSTALL Normal file
View file

@ -0,0 +1,12 @@
wmAppKill requires the libGtop.
Download it at: http://www.home-of-linux.org/gnome/libgtop/
To install wmAppKill :
1. tar xvfz wmAppKill-x.x.tar.gz
2. make
3. make install (you must be root)

20
wmappkill/Makefile Normal file
View file

@ -0,0 +1,20 @@
GTOP_LIBS = -lgtop -lgtop_sysdeps -lgtop_common -lXau
GCCOPTS = -O2 -Wall -g
CFLAGS= -Wall
LDLIBS = -lX11 -lXpm -lXext
LDFLAGS= -L/usr/X/lib -L/usr/X11R6/lib -L/usr/X11/lib -L/usr/local/lib/X11
all : wmAppKill
wmAppKill : wmAppKill.c
gcc ${GCCOPTS} wmAppKill.c -o wmAppKill ${GTOP_LIBS} ${LDFLAGS} ${LDLIBS}
install: wmAppKill
install -m 755 wmAppKill /usr/bin/wmAppKill
clean:
$(RM) *.o core tst *~ \#*

21
wmappkill/README Normal file
View file

@ -0,0 +1,21 @@
wmAppKill v0.2
--------------
wmAppKill is a Window Maker dock applet that lists all your running processes.
You can kill any of them by doubleclicking on their names.
You can specify wich process will be the oldest one of the list.
The one by default is "wmaker".
Type "wmAppKill -h" to get command line options.
Please send comments, bugs, modifications to : rozange@club-internet.fr
Future releases will be holded at:
http://internettrash.com/users/beuz/wmappkill.html
Hope you'll enjoy it...
You might want to check this other cool dockapp from which i started :
wmNetscapeKiller at http://pblumo.free.fr/wmNetscapeKiller

47
wmappkill/fond.xbm Normal file
View file

@ -0,0 +1,47 @@
/* Created with The GIMP */
#define fond_width 64
#define fond_height 64
static char fond_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, 0xf0, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x0f, 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 };

611
wmappkill/wmAppKill.c Normal file
View file

@ -0,0 +1,611 @@
/*
* wmAppKill v0.2 - S.Rozange
*
* 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, 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 (see the file COPYING); if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA
*
*/
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <X11/Xlib.h>
#include <X11/xpm.h>
#include <X11/Xutil.h>
#include <X11/extensions/shape.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/wait.h>
#include <glibtop.h>
#include <glibtop/proclist.h>
#include <glibtop/procstate.h>
#include <glibtop/xmalloc.h>
#include <time.h>
#include <signal.h>
#include "fond.xbm"
#include "wmAppKill.xpm"
#include "wmAppKill.h"
Display *dpy; /* xlib global vars */
GC gc;
Window win;
Window iconWin;
Pixmap XPM;
int screen;
_zone *fZone = NULL;
_desc *pList = NULL; /* double linked list */
_desc *posProc = NULL; /* lower proc showed on the dock */
pid_t tabNoProc[NB_LINE]; /* array containing each line's pid */
pid_t lastProcPid; /* oldest proc before refreshment */
char *procBaseName = PROC_DEF; /* procBase is NULL if we want all the proc to be listed */
int procBasePos = 0; /* procbase's pos in linked list */
pid_t procBasePid = 1; /* procbase's pid */
unsigned int gNbProc = 0; /* proc number starting from procBase */
unsigned int gNbProcTotal = 0; /* total proc number */
struct timeval timev; /* to detect double-click */
void ZoneCreate(int x, int y, int width, int height, char no)
{
_zone *last;
if (!fZone) {
fZone = (_zone *)malloc(sizeof(_zone));
last = fZone;
} else {
for (last = fZone; last -> next; last = last -> next);
last -> next = (_zone *)malloc(sizeof(_zone));
last = last -> next;
}
last -> x = x;
last -> y = y;
last -> width = width;
last -> height = height;
last -> no = no;
last -> next = NULL;
}
char CheckZone(void)
{
int x, y,popo;
unsigned int mask;
Window root_ret, child_ret;
_zone *curseur = fZone;
XQueryPointer(dpy, iconWin, &root_ret, &child_ret, &popo, &popo, &x, &y, &mask); /* mouse position */
do {
if ((x >= curseur -> x) && (x <= curseur -> x + curseur -> width) && (y >= curseur -> y) && (y <= curseur -> y + curseur -> height))
return curseur -> no;
}
while ((curseur = curseur -> next));
return 0;
}
void GarbageCollector(_desc *garb)
{
_desc *next;
while (garb) {
next = garb -> next;
free(garb);
garb = next;
}
}
int CheckProc(pid_t pid)
{
glibtop_proclist bof;
unsigned int *n;
if ((n = glibtop_get_proclist (&bof, GLIBTOP_KERN_PROC_PID , (int64_t)pid)) == NULL) {
glibtop_free(n);
return -1;
}
glibtop_free(n);
return 0;
}
_desc *GetProcList(void) /* create a double linked list */
{
glibtop_proclist buf;
unsigned int *n;
unsigned int nbPr;
int i;
_desc *lastOne;
_desc *glump;
_desc *res;
if ((n = glibtop_get_proclist (&buf, GLIBTOP_KERN_PROC_UID, (int64_t)getuid())) == NULL) {
fprintf(stderr, "Problem using libgtop\n");
exit(1);
};
nbPr = (int)buf.number;
glump = (_desc *)malloc(sizeof(_desc));
res = glump;
lastOne = NULL;
for (i = nbPr; i; i--){
char *bof;
glibtop_proc_state buf;
glump -> previous = lastOne;
glump -> next = (_desc *)malloc(sizeof(_desc));
glibtop_get_proc_state(&buf, glump -> pid = n[i - 1]);
strcpy(glump -> name, bof = buf.cmd);
if (strlen(glump -> name) > MAX_CHAR)
glump -> name[MAX_CHAR] = 0;
lastOne = glump;
glump = glump -> next;
if (procBaseName && !strcmp(bof, procBaseName)) {
procBasePos = i - 1;
procBasePid = n[i - 1];
break;
}
}
lastOne -> next = NULL;
lastProcPid = n[nbPr - 1];
glibtop_free(n);
if (procBaseName && i) gNbProc = nbPr - i + 1; /* procBase has been found */
else { /* procBaseName is null or hasn't been found */
procBaseName = NULL;
procBasePos = 0;
procBasePid = n[0];
gNbProc = nbPr;
}
gNbProcTotal = nbPr;
return res;
}
int CheckProcToRemove(unsigned int *procList, unsigned int procListSize)
{
_desc *curseur = pList, *temp;
int nbProcRemoved = 0, i;
while (curseur) {
for (i = procListSize; i; i--)
if (curseur -> pid == procList[i - 1]) break;
temp = curseur;
curseur = curseur -> next;
if (!i) { /* we didn't find it in proclist, let's remove it */
RemoveProc(temp);
gNbProc--;
nbProcRemoved++;
}
}
return nbProcRemoved;
}
int CheckProcToAdd(int pos, unsigned int *procList, unsigned int procListSize)
{
_desc *glump;
int i, compteur = 0;
glibtop_proc_state buf;
for (i = pos; i < procListSize ; i++){
compteur++;
glump = (_desc *)malloc(sizeof(_desc));
usleep(20000); /* libgtop seems to need a little bit of time */
if (CheckProc(procList[i])) continue; /* checking if the process isn't already dead */
glibtop_get_proc_state(&buf, glump -> pid = procList[i]);
strcpy(glump -> name, buf.cmd);
if (strlen(glump -> name) > MAX_CHAR)
glump -> name[MAX_CHAR] = 0;
pList -> previous = glump;
glump -> next = pList;
glump -> previous = NULL;
if (posProc == pList) posProc = glump;
pList = glump;
gNbProc++;
gNbProcTotal++;
lastProcPid = glump -> pid;
}
return compteur;
}
int CheckProcChange(void)
{
glibtop_proclist buf;
unsigned int *n;
unsigned int nbPr;
int diffNbProc;
if ((n = glibtop_get_proclist (&buf, GLIBTOP_KERN_PROC_UID, (int64_t)getuid())) == NULL) return -1;
nbPr = (int)buf.number;
if ((nbPr == gNbProcTotal) && (n[nbPr - 1] == lastProcPid)) return 0; /* nothing changed */
if (procBaseName && (n[procBasePos] != procBasePid)) /* some proc killed before the baseproc (=oldest proc) */
{
if (CheckProc(procBasePid)) { /* baseproc doesn't exist anymore */
GarbageCollector(pList);
pList = GetProcList(); /* so we create a whole new list */
posProc = pList;
return 1;
}
else
while (n[--procBasePos] != procBasePid); /* here we find what's the new pos. of baseproc */
}
diffNbProc = (nbPr - procBasePos) - gNbProc; /* nb of changes after baseproc */
if (diffNbProc == 0 && (n[nbPr - 1] == lastProcPid)){ /* only changes before baseproc */
gNbProcTotal = nbPr;
glibtop_free(n);
return 0;
}
if (diffNbProc > 0 && n[nbPr - diffNbProc - 1] == lastProcPid) /* only proc to add */
CheckProcToAdd(nbPr - diffNbProc, n, nbPr);
else { /* to remove [and to add] */
int nb;
nb = CheckProcToRemove(n, nbPr);
if (nb != -diffNbProc)
CheckProcToAdd(nbPr - diffNbProc - 1, n, nbPr);
}
glibtop_free(n);
return 1;
}
void RemoveProc(_desc *cible)
{
_desc *temp1, *temp2;
_desc *curseur;
int i;
temp1 = cible -> previous;
temp2 = cible -> next;
for (curseur = cible, i = 0; curseur && i != NB_LINE + 1; curseur = curseur -> next, ++i);
if (!(gNbProc - 1 < NB_LINE) && (i == 2 || i == 3)) { /* the killed proc is near the start of the list */
for (--i, curseur = posProc; i && curseur -> previous; curseur = curseur -> previous, --i);
posProc = curseur;
}
else if ((cible == posProc) && (cible -> previous)) {
posProc = cible -> previous;
}
else if ((cible == posProc) && (cible -> next)) {
posProc = cible -> next;
}
if (temp1) temp1 -> next = temp2;
else {
pList = temp2;
temp2 -> previous = NULL;
gNbProcTotal--;
lastProcPid = temp2 -> pid;
free(cible);
return;
}
if (temp2) temp2 -> previous = temp1;
else
temp1 -> next = NULL;
free(cible);
gNbProcTotal--;
}
void ShowString (int x, int y, char *doudou)
{
int i = 0;
char c;
while ((c = tolower(doudou[i++]))){
if (c >= 'a' && c <= 'z') {
XCopyArea(dpy,XPM, win,gc, 1 + (c - 'a') * 6, 10, 5, 8, x, y) ;
XCopyArea(dpy,XPM, iconWin,gc, 1 + (c - 'a') * 6, 10, 5, 8, x, y) ;
x += 6;
}
}
}
void DoExp(){
XClearWindow(dpy, win);
XClearWindow(dpy, iconWin);
XCopyArea(dpy, XPM ,win, gc, 1 + (26) * 6, 10, 6, 8, 5, 51);
XCopyArea(dpy, XPM, iconWin, gc, 1 + (26) * 6, 10, 6, 8, 5, 51);
XCopyArea(dpy, XPM, win, gc, 1 + (27) * 6, 10, 6, 8, 53, 51);
XCopyArea(dpy, XPM, iconWin, gc, 1 + (27) * 6, 10, 6, 8, 53, 51);
XCopyArea(dpy, XPM, win, gc, 106, 0, 28, 8, 17, 50);
XCopyArea(dpy, XPM, iconWin, gc, 106, 0, 28, 8, 17, 50);
DoExpose();
}
void DoExpose() {
int i;
_desc *curseur;
for (i = NB_LINE; i; i--){
XCopyArea(dpy, XPM, win, gc, 2, 22, 53, 9, X_PROC + 1, Y_PROC + ((i - 1) * 10));
XCopyArea(dpy, XPM, iconWin, gc, 2, 22, 53, 9, X_PROC + 1, Y_PROC + ((i - 1) * 10));
}
if (gNbProc < NB_LINE) {
int y;
i = gNbProc;
for (y = NB_LINE; y != gNbProc; y--) tabNoProc[y - 1] = -1;
}
else i = NB_LINE;
for (curseur = posProc; i; curseur = curseur -> next, i--)
{
ShowString(X_PROC + 1, Y_PROC + (i - 1) * 10, curseur -> name);
tabNoProc[i - 1] = curseur -> pid;
}
}
void DoClick(XEvent ev)
{
unsigned char doubleClick = 0;
static unsigned char firstClick = 0;
_desc *curseur;
char zone, i;
zone = CheckZone();
if (ev.xbutton.button == CLICK_TWO) {
DoExpose() ;
}
/* Mouse wheel patch by Mathieu Cuny */
if (ev.xbutton.button == WHEEL_UP && gNbProc > NB_LINE) {
for (i = NB_LINE, curseur = posProc; i; curseur = curseur -> next, i--);
if (curseur) posProc = posProc -> next;
DoExpose();
}
if (ev.xbutton.button == WHEEL_DOWN && posProc -> previous && gNbProc > NB_LINE) {
posProc = posProc -> previous;
DoExpose();
}
/* Mouse wheel patch end */
if (ev.xbutton.button == CLICK_ONE) {
struct timeval temp;
long long nms1;
gettimeofday(&temp, NULL);
nms1 = temp.tv_sec - timev.tv_sec; /* nb sec since last click */
if ((!nms1 || nms1 == 1)){
long long yop = (nms1 * 1000000L) + (temp.tv_usec - timev.tv_usec); /* nb mlsec since last click */
if (firstClick && (yop < DOUBLE_CLICK_DELAY)){ /* we got double click */
doubleClick = 1;
firstClick = 0;
} else firstClick = 1;
} else firstClick = 1;
timev = temp;
if (zone == UP && !doubleClick && gNbProc > NB_LINE)
{
for (i = NB_LINE, curseur = posProc; i; curseur = curseur -> next, i--);
if (curseur) posProc = posProc -> next;
DoExpose();
}
else if (zone == DOWN && posProc -> previous && !doubleClick && gNbProc > NB_LINE)
{
posProc = posProc -> previous;
DoExpose();
}
else if (zone == UP && doubleClick && gNbProc > NB_LINE)
{
for (curseur = pList; curseur -> next; curseur = curseur -> next); /* curseur = end of list */
for (i = NB_LINE - 1; i; curseur = curseur -> previous, i--);
posProc = curseur;
DoExpose();
}
else if (zone == DOWN && doubleClick && gNbProc > NB_LINE)
{
posProc = pList;
DoExpose();
}
else if (zone > 0 && zone <= NB_LINE && doubleClick && tabNoProc[zone - 1] != -1)
{
kill(tabNoProc[zone - 1], SIGKILL); /* let's kill the mofo */
waitpid(tabNoProc[zone - 1], NULL, 0);
}
if (doubleClick) doubleClick = 0;
}
}
void DoEvents() {
unsigned long long compteur = 0;
XEvent ev ;
for (;;){
if (!compteur){
if (CheckProcChange()) DoExpose();
compteur = UPDATE_NB * DELAY;
}
while(XPending(dpy)){
XNextEvent(dpy,&ev);
switch(ev.type) {
case Expose : DoExp(); break;
case ButtonPress : DoClick(ev); break;
}
}
usleep(DELAY);
compteur -= DELAY;
}
}
void PrintUsage(void)
{
printf("usage: wmAppKill [-a] [-n <name>] [-h]\n");
printf("\t-a\t\tSelect all processes\n");
printf("\t-n <name>\tDo not select processes older than <name> (default: wmaker)\n");
printf("\t-h\t\tDisplay help screen\n");
}
void GetArg(int argc, char *argv[])
{
if (argc == 1) return;
else if (argc == 3 && !strcmp(argv[1], "-n") && argv[2][0] != '-')
procBaseName = strdup(argv[2]);
else if (argc == 2 && !strcmp(argv[1], "-a"))
procBaseName = NULL;
else if (argc == 2 && !strcmp(argv[1], "-h"))
{
PrintUsage();
exit(1);
}
else {
PrintUsage();
exit(1);
}
}
void CreateDock(int argc, char *argv[]) /* this part comes from http://www.linuxmag-france.org/ */
{
Window root;
XWMHints wmHints;
XSizeHints sizeHints;
XClassHint classHint;
Pixmap pixmask;
unsigned long p_blanc;
unsigned long p_noir;
unsigned int borderWidth = 2;
char *wname = argv[0] ;
dpy = XOpenDisplay(NULL) ;
if(dpy == NULL)
{
fprintf(stderr, "Can't open display\n") ;
exit(1) ;
}
root = RootWindow(dpy,screen);
p_blanc = WhitePixel(dpy,screen) ;
p_noir = BlackPixel(dpy,screen) ;
gc = XDefaultGC(dpy,screen) ;
XSetForeground(dpy, gc, p_noir);
XSetBackground(dpy, gc,p_noir);
sizeHints.x = 0 ;
sizeHints.y = 0 ;
sizeHints.width = 64 ;
sizeHints.height = 64 ;
win = XCreateSimpleWindow(dpy,root,sizeHints.x,sizeHints.y , sizeHints.width, sizeHints.height, borderWidth, p_noir,p_noir) ;
iconWin = XCreateSimpleWindow(dpy,root,sizeHints.x,sizeHints.y,sizeHints.width, sizeHints.height, borderWidth, p_noir,p_noir ) ;
sizeHints.flags = USSize | USPosition ;
XSetWMNormalHints(dpy,win,&sizeHints) ;
wmHints.initial_state = WithdrawnState ;
wmHints.icon_window = iconWin ;
wmHints.icon_x = sizeHints.x ;
wmHints.icon_y = sizeHints.y ;
wmHints.window_group = win ;
wmHints.flags = StateHint | IconWindowHint | IconPositionHint | WindowGroupHint ;
XSetWMHints(dpy, win, &wmHints) ;
classHint.res_name = wname ;
classHint.res_class = wname ;
XSetClassHint(dpy, win, &classHint) ;
XSetCommand(dpy,win, argv, argc) ;
pixmask = XCreateBitmapFromData(dpy,win,fond_bits, fond_width, fond_height) ;
XShapeCombineMask(dpy,win,ShapeBounding,0,0,pixmask,ShapeSet) ;
XShapeCombineMask(dpy,iconWin,ShapeBounding, 0, 0, pixmask, ShapeSet) ;
XpmCreatePixmapFromData(dpy,root,wmAppKill_xpm, &XPM, NULL,NULL) ;
XSelectInput(dpy,win, ExposureMask | ButtonPressMask) ;
XSelectInput(dpy,iconWin, ExposureMask | ButtonPressMask) ;
XMapWindow(dpy,win) ;
}
int main(int argc, char *argv[])
{
int i;
GetArg(argc, argv);
glibtop_init();
CreateDock(argc, argv);
gettimeofday(&timev, NULL);
pList = GetProcList();
posProc = pList;
ZoneCreate(4, 50, 8, 8, UP);
ZoneCreate(54, 50, 8, 8, DOWN);
for (i = NB_LINE; i; i--)
ZoneCreate(X_PROC + 1, Y_PROC + (i - 1) * 10 + 2, 48, 7, i);
DoEvents();
return 0;
}

54
wmappkill/wmAppKill.h Normal file
View file

@ -0,0 +1,54 @@
#define PROC_DEF "wmaker"
#define MAX_CHAR 8
#define NB_LINE 4
#define CLICK_ONE 1
#define CLICK_TWO 3
#define WHEEL_UP 4
#define WHEEL_DOWN 5
#define X_PROC 6
#define Y_PROC 7
#define DOWN 7 /* minus */
#define UP 8 /* plus */
#define DOUBLE_CLICK_DELAY 170000L
#define DELAY 10000
#define UPDATE_NB 60 /* checking delay = DELAY * UPDATE_NB (ms) */
typedef struct _desc{
char name[40];
pid_t pid;
struct _desc *previous;
struct _desc *next;
} _desc;
typedef struct _zone{
int x;
int y;
int width;
int height;
char no;
struct _zone *next;
} _zone;
void ZoneCreate(int x, int y, int width, int height, char no);
void GarbageCollector(_desc *garb);
char CheckZone(void);
int CheckProc(pid_t pid);
_desc *GetProcList(void);
int CheckProcToRemove(unsigned int *procList, unsigned int procListSize);
int CheckProcToAdd(int pos, unsigned int *procList, unsigned int procListSize);
int CheckProcChange(void);
void RemoveProc(_desc *cible);
void ShowString (int x, int y, char *doudou);
void DoExp();
void DoExpose();
void DoClick(XEvent ev);
void DoEvents();
void PrintUsage(void);
void GetArg(int argc, char *argv[]);
void CreateDock(int argc, char *argv[]);

375
wmappkill/wmAppKill.xpm Normal file
View file

@ -0,0 +1,375 @@
/* XPM */
static char * wmAppKill_xpm[] = {
"178 38 334 2",
" c None",
". c #202020",
"+ c #0000FF",
"@ c #09070C",
"# c #08060B",
"$ c #010004",
"% c #07050A",
"& c #030106",
"* c #060409",
"= c #040207",
"- c #010005",
"; c #05040C",
"> c #000005",
", c #000004",
"' c #09090B",
") c #000000",
"! c #010101",
"~ c #000002",
"{ c #07060C",
"] c #0D0C14",
"^ c #000007",
"/ c #20B2AE",
"( c #004941",
"_ c #007D71",
": c #010002",
"< c #050306",
"[ c #0B090E",
"} c #020003",
"| c #050308",
"1 c #0C0A0F",
"2 c #09080E",
"3 c #060606",
"4 c #020200",
"5 c #030301",
"6 c #060604",
"7 c #040404",
"8 c #030207",
"9 c #010006",
"0 c #0B0A0F",
"a c #070709",
"b c #B60418",
"c c #00EB00",
"d c #283C38",
"e c #050304",
"f c #060407",
"g c #A3A1A2",
"h c #636164",
"i c #333132",
"j c #FCFAFD",
"k c #727071",
"l c #2A282B",
"m c #DFDDDE",
"n c #080607",
"o c #030102",
"p c #0A0809",
"q c #C0BFBD",
"r c #7B7A76",
"s c #010000",
"t c #070602",
"u c #B7B6B4",
"v c #424043",
"w c #ABA9AE",
"x c #A09EA3",
"y c #F7F3FF",
"z c #060405",
"A c #767475",
"B c #9D9B9C",
"C c #5F5D5E",
"D c #E0DEDF",
"E c #A7A5A6",
"F c #696768",
"G c #ABA9AA",
"H c #151314",
"I c #2D2B2C",
"J c #292728",
"K c #252324",
"L c #0B090A",
"M c #3D3B3C",
"N c #1D1B1E",
"O c #121011",
"P c #EAE9E5",
"Q c #D0CFCA",
"R c #080702",
"S c #CAC9C5",
"T c #413F40",
"U c #838184",
"V c #B9B7BC",
"W c #050402",
"X c #71E371",
"Y c #010100",
"Z c #2B2B29",
"` c #DBDBD9",
" . c #A3A3A1",
".. c #888886",
"+. c #D2D2D0",
"@. c #969694",
"#. c #80807E",
"$. c #444442",
"%. c #D5D5D3",
"&. c #737371",
"*. c #F2F2F0",
"=. c #90908E",
"-. c #BABABA",
";. c #B0AEB1",
">. c #040203",
",. c #686765",
"'. c #9D9C98",
"). c #EAE9E4",
"!. c #212119",
"~. c #B9B8B4",
"{. c #939192",
"]. c #FFFEFF",
"^. c #2F2D30",
"/. c #090806",
"(. c #0C0C0A",
"_. c #FFFFFD",
":. c #D7D7D5",
"<. c #EDEDEB",
"[. c #DFDFDD",
"}. c #3E3E3C",
"|. c #393937",
"1. c #CACAC8",
"2. c #B7B7B5",
"3. c #454543",
"4. c #3B3B3B",
"5. c #BEBCBF",
"6. c #B2B1AF",
"7. c #767571",
"8. c #A9A8A3",
"9. c #75756D",
"0. c #030200",
"a. c #C2C1BD",
"b. c #EDECEA",
"c. c #A2A0A1",
"d. c #7E7C7F",
"e. c #050505",
"f. c #BDBDBD",
"g. c #F0F0F0",
"h. c #B2B2B2",
"i. c #FEFEFE",
"j. c #444444",
"k. c #B6B6B6",
"l. c #020202",
"m. c #C0C0C0",
"n. c #3A3A3A",
"o. c #464646",
"p. c #BBB9BC",
"q. c #1B191A",
"r. c #E7E6E4",
"s. c #C5C4C0",
"t. c #C7C6C1",
"u. c #D2D1CC",
"v. c #C4C3BF",
"w. c #4D4C4A",
"x. c #141213",
"y. c #DDDBDE",
"z. c #151316",
"A. c #0B0B0B",
"B. c #090909",
"C. c #8F8F8F",
"D. c #AFAFAF",
"E. c #7C7C7C",
"F. c #D0D0D0",
"G. c #3D3D3D",
"H. c #C6C6C6",
"I. c #BEBEBE",
"J. c #3C3C3E",
"K. c #C4C2C5",
"L. c #666467",
"M. c #959394",
"N. c #E3E2DD",
"O. c #23221E",
"P. c #BDBCBA",
"Q. c #383637",
"R. c #080609",
"S. c #7A787D",
"T. c #949297",
"U. c #040205",
"V. c #060608",
"W. c #19191B",
"X. c #2A2A2C",
"Y. c #0F0F11",
"Z. c #303032",
"`. c #0B0B0D",
" + c #161618",
".+ c #232325",
"++ c #2E2E30",
"@+ c #1A1A1C",
"#+ c #171719",
"$+ c #27262B",
"%+ c #1F1E23",
"&+ c #222222",
"*+ c #030400",
"=+ c #2C2D28",
"-+ c #151513",
";+ c #2E2E2C",
">+ c #212123",
",+ c #020106",
"'+ c #111015",
")+ c #3E3D42",
"!+ c #C7C5C8",
"~+ c #107D79",
"{+ c #188A86",
"]+ c #9C9AA8",
"^+ c #9F9EAC",
"/+ c #9C9EAB",
"(+ c #9A9EA9",
"_+ c #989CA8",
":+ c #979BA7",
"<+ c #989AA7",
"[+ c #9799A6",
"}+ c #9698A5",
"|+ c #9695A3",
"1+ c #9A99A9",
"2+ c #9693A4",
"3+ c #9390A1",
"4+ c #918E9F",
"5+ c #9491A2",
"6+ c #9894A5",
"7+ c #9897A5",
"8+ c #9294A0",
"9+ c #898B97",
"0+ c #9799A5",
"a+ c #8F919D",
"b+ c #8E909C",
"c+ c #8B8D99",
"d+ c #848692",
"e+ c #90929E",
"f+ c #81838F",
"g+ c #8D8F9B",
"h+ c #868894",
"i+ c #8B8B97",
"j+ c #7E7E8A",
"k+ c #8A8997",
"l+ c #81818D",
"m+ c #888894",
"n+ c #81818B",
"o+ c #82828E",
"p+ c #82828C",
"q+ c #80808A",
"r+ c #7F7F89",
"s+ c #7E7E88",
"t+ c #A3A1AF",
"u+ c #9A99A7",
"v+ c #9D9FAB",
"w+ c #9CA0A9",
"x+ c #9B9FAA",
"y+ c #999BA7",
"z+ c #989AA6",
"A+ c #9999A5",
"B+ c #9896A4",
"C+ c #9795A3",
"D+ c #9694A2",
"E+ c #9692A1",
"F+ c #9593A1",
"G+ c #9392A0",
"H+ c #9193A0",
"I+ c #90929F",
"J+ c #8F919E",
"K+ c #8E909D",
"L+ c #8D8F9C",
"M+ c #8C8E9B",
"N+ c #8B8D9A",
"O+ c #8A8C99",
"P+ c #898B98",
"Q+ c #8A8A96",
"R+ c #8A8A94",
"S+ c #898995",
"T+ c #888892",
"U+ c #878791",
"V+ c #868690",
"W+ c #86868E",
"X+ c #84848E",
"Y+ c #84848C",
"Z+ c #83838B",
"`+ c #82828A",
" @ c #818189",
".@ c #00FF00",
"+@ c #04FA00",
"@@ c #08F600",
"#@ c #0DF200",
"$@ c #11ED00",
"%@ c #16E900",
"&@ c #1AE500",
"*@ c #1FE000",
"=@ c #23DC00",
"-@ c #28D800",
";@ c #2CD300",
">@ c #31CF00",
",@ c #35CB00",
"'@ c #3AC600",
")@ c #3EC200",
"!@ c #42BE00",
"~@ c #47BA00",
"{@ c #4BB500",
"]@ c #50B100",
"^@ c #54AD00",
"/@ c #59A800",
"(@ c #5DA400",
"_@ c #62A000",
":@ c #669B00",
"<@ c #6B9700",
"[@ c #6F9300",
"}@ c #748E00",
"|@ c #788A00",
"1@ c #7D8600",
"2@ c #818200",
"3@ c #867D00",
"4@ c #8A7900",
"5@ c #8E7500",
"6@ c #937000",
"7@ c #976C00",
"8@ c #9C6800",
"9@ c #A06300",
"0@ c #A55F00",
"a@ c #A95B00",
"b@ c #AE5600",
"c@ c #B25200",
"d@ c #B74E00",
"e@ c #BB4900",
"f@ c #C04500",
"g@ c #C44100",
"h@ c #C93C00",
"i@ c #CD3800",
"j@ c #D23400",
"k@ c #D62F00",
"l@ c #DB2B00",
"m@ c #DF2700",
"n@ c #E42200",
"o@ c #E81E00",
"p@ c #ED1A00",
"q@ c #F11500",
"r@ c #F61100",
"s@ c #FA0D00",
". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + @ # $ % $ & * $ = * $ & $ $ - ; > , ' ) ) ! ~ > { ] ^ > , + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ",
". . / / / . . . ( ( ( _ . _ / / / _ . _ / / / _ . _ ( ( ( _ . _ / / / _ . _ / / / _ . _ / / / _ . _ / / / _ . _ / / / _ . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + : $ < = : % : * : [ } | : 1 * > 2 ~ 3 4 5 6 7 8 9 > > 0 a + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ",
". / . . . / . ( . . . / . ( . . . / . ( . . . / . / . . . / . / . . . ( . / . . . ( . ( . . . / . / . . . / . / . . . / . . . . . . . . . . . . / . . . . . . + + . b b . + + . c c . + + . d d . + + + + + + + + + e f g h i j k l m : n : o : : $ @ p q r s t u v $ w x < s + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ",
". / . . . / . ( . . . / . ( . . . / . ( . . . / . / . . . / . / . . . ( . / . . . ( . ( . . . / . / . . . / . / . . . / . . / . . . . / . . . . / . . . . . . + + b y b b + + c y c c + + d d d d + + + + + + + + + s z A B C D E F G H I J K L M N : O P Q R s S T U V : s W + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ",
". _ ( ( ( _ . . ( ( ( _ . _ / / / _ . . / / / _ . _ / / / _ . _ / / / _ . _ / / / _ . . ( ( ( _ . ( / / / ( . _ / / / _ . . _ . . . . _ . . . / . . . . . . . + + b b b b + + c c c c + + d d d d + + + . / ( X + + Y ) Z ` ...+.@.#.$.%.&.*.=.-.;.>.,.'.).!.s ~.{.].^.} s /.+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ",
". / . . . / . ( . . . / . / . . . ( . ( . . . / . ( . . . / . ( . . . / . / . . . / . ( . . . / . / . . . / . ( . . . / . . . . . . . . . . . / . . . . . . . + + . b b . + + . c c . + + . d d . + + + + + + + + + (.) 4 _.:.Z <.[.}.|.1.) 2.3.4.5.n 6.7.8.9.0.a.b.c.d.: n s + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ",
". / . . . / . ( . . . / . / . . . ( . ( . . . / . ( . . . / . ( . . . / . / . . . / . ( . . . / . / . . . / . ( . . . / . . / . . . . / . . / . . . . . . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + ) ) e.f.g.) h.i.3 j.k.l.m.n.o.p.q.r.s.t.u.s v.w.x.y.z.s s + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ",
". . / / / . . . ( ( ( / . _ / / / _ . _ / / / _ . . ( ( ( _ . _ / / / _ . _ / / / _ . . ( ( ( _ . _ / / / _ . _ / / / _ . . _ . . . . _ . . / . . . . . . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + A.B.! C.D.l.E.F.) G.H.B.I.G.J.K.L.M.0.s N.O.P.Q.R.S.T.U.p + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ",
". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + ~ V.~ W.X.~ Y.Z.`. +.+~ ++@+#+$+%+&+6 *+=+-+;+>+,+'+)+Y.) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ",
"+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ",
". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . / . . . + + + ",
". ( / / / ( . _ / / / . . _ / / / _ . _ / / / . . _ / / / _ . _ / / / _ . _ / / / _ . _ ( ( ( _ . . ( / ( . . . ( ( ( _ . _ ( ( ( _ . _ ( ( ( . . / ( ( ( / . _ / / / . . _ / / / _ . _ / / / _ . _ / / / _ . _ / / / _ . _ / / / _ . _ / / / _ . _ ( ( ( _ . _ ( ( ( _ . _ ( ( ( _ . _ ( ( ( _ . _ ( ( ( _ . _ / / / _ . . . _ _ . . . . . . . . . . . . . . + + + ",
". / . . . / . / . . . / . / . . . ( . / . . . / . / . . . ( . / . . . ( . / . . . ( . / . . . / . ( . / . ( . ( . . . / . / . . . / . / . . . ( . / / . / / . / . . . / . / . . . / . / . . . / . / . . . / . / . . . / . / . . . ( . ( . / . ( . / . . . / . / . . . / . / . . . / . / . . . / . / . . . / . ( . . . / . . . _ _ . . . . . . . . ( / / / ( . + + + ",
". / . . . / . / . . . / . / . . . ( . / . . . / . / . . . ( . / . . . ( . / . . . ( . / . . . / . ( . / . ( . ( . . . / . / . . / ( . / . . . ( . / . / . / . / . . . / . / . . . / . / . . . / . / . . . / . / . . . / . / . . . ( . ( . / . ( . / . . . / . / . . . / . / . . . / . ( / . / ( . / . . . / . ( . . / ( . _ _ _ _ _ _ _ _ _ _ _ _ / . . . / . + + + ",
". _ / / / _ . _ / / / . . _ ( ( ( . . _ ( ( ( _ . _ / / / . . _ / / / . . _ ( / / _ . _ / / / _ . . ( / ( . . . ( ( ( _ . _ / / ( . . _ ( ( ( . . _ ( ( ( _ . _ ( ( ( _ . _ ( ( ( _ . _ / / / _ . _ / ( ( _ . _ / / / . . _ / / / _ . . ( _ ( . . _ ( ( ( _ . _ ( ( ( _ . _ ( ( ( _ . . ( / ( . . _ / / / _ . . ( / ( . . _ _ _ _ _ _ _ _ _ _ _ _ / . . . / . + + + ",
". / . . . / . / . . . / . / . . . ( . / . . . / . / . . . ( . / . . . ( . / . . . / . / . . . / . ( . / . ( . ( . . . / . / . . / ( . / . . . ( . / . . . / . / . . . / . / . . . / . / . . . ( . / . / . / . / . . . / . ( . . . / . ( . / . ( . / . . . / . / . . . / . / . / . / . ( / . / ( . ( . . . / . ( / . . ( . . . _ _ . . . . . . . . _ / / / _ . + + + ",
". / . . . / . / . . . / . / . . . ( . / . . . / . / . . . ( . / . . . ( . / . . . / . / . . . / . ( . / . ( . ( . . . / . / . . . / . / . . . ( . / . . . / . / . . . / . / . . . / . / . . . ( . / . . / / . / . . . / . ( . . . / . ( . / . ( . / . . . / . / . . . / . / / . / / . / . . . / . ( . . . / . / . . . ( . . . _ _ . . . . . . . . / . . . / . + + + ",
". _ ( ( ( _ . _ / / / . . _ / / / _ . / / / / . . _ / / / _ . / ( ( ( . . _ / / / _ . _ ( ( ( _ . . ( / ( ( . _ / / / _ . _ ( ( ( _ . _ / / / ( . _ ( ( ( _ . / ( ( ( / . _ / / / _ . _ ( ( ( . . _ / / / _ . _ ( ( ( _ . _ / / / _ . . ( _ ( . . ( / / / / . . / / / . . / ( ( ( / . _ ( ( ( / _ _ / / / _ . _ / / / _ . . . . . . . . . . . . . _ . . . _ . + + + ",
". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + ",
"+ + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . !++ + + . + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ",
"+ + !+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!++ + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ",
"+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + !++ + + . + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ",
"+ ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ",
"+ + . . ( ( ( . . . ( ( ( . . . ( ( ( . . . ( ( ( . . . ( ( ( . . . ( ( ( . . . ( ( ( . . . ( ( ( . . . . + + . . . / / / / . . . ( ( ( ( ~+. ~+/ / / / {+. ~+/ / / / ~+. ~+( ( ( ( ~+. ~+/ / / / ~+. ~+/ / / / {+. ~+/ / / / ~+. ~+/ / / / {+. ~+/ / / / {+. . . . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ",
"+ + . ( . . . ( . ( . . . ( . ( . . . ( . ( . . . ( . ( . . . ( . ( . . . ( . ( . . . ( . ( . . . ( . . . + + . . / . . . . / . ( . . . . / . ( . . . . / . ( . . . . / . / . . . . / . / . . . . ( . / . . . . ( . ( . . . . / . / . . . . / . / . . . . / . . / . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ",
"+ + . ( . . . ( . ( . . . ( . ( . . . ( . ( . . . ( . ( . . . ( . ( . . . ( . ( . . . ( . ( . . . ( . . . + + . . / . . . . / . ( . . . . / . ( . . . . / . ( . . . . / . / . . . . / . / . . . . ( . / . . . . ( . ( . . . . / . / . . . . / . / . . . . / . . / . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ",
"+ + . . ( ( ( . . . ( ( ( . . . ( ( ( . . . ( ( ( . . . ( ( ( . . . ( ( ( . . . ( ( ( . . . ( ( ( . . . . + + . . / . . . . / . ( . . . . / . ( . . . . / . ( . . . . / . / . . . . / . / . . . . ( . / . . . . ( . ( . . . . / . / . . . . / . / . . . . / . . . . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ",
"+ + . ( . . . ( . ( . . . ( . ( . . . ( . ( . . . ( . ( . . . ( . ( . . . ( . ( . . . ( . ( . . . ( . . . + + . . ~+( ( ( ( ~+. . ( ( ( ( ~+. ~+/ / / / ~+. ~+/ / / / ~+. ~+/ / / / ~+. ~+/ / / / ~+. ~+/ / / / ~+. . ( ( ( ( ~+. ~+/ / / / ~+. ~+/ / / / ~+. . . . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ",
"+ + . ( . . . ( . ( . . . ( . ( . . . ( . ( . . . ( . ( . . . ( . ( . . . ( . ( . . . ( . ( . . . ( . . . + + . . / . . . . / . ( . . . . / . / . . . . ( . ( . . . . / . ( . . . . / . ( . . . . / . / . . . . / . ( . . . . / . / . . . . / . ( . . . . / . . . . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ",
"+ + . . ( ( ( . . . ( ( ( . . . ( ( ( . . . ( ( ( . . . ( ( ( . . . ( ( ( . . . ( ( ( . . . ( ( ( . . . . + + . . / . . . . / . ( . . . . / . / . . . . ( . ( . . . . / . ( . . . . / . ( . . . . / . / . . . . / . ( . . . . / . / . . . . / . ( . . . . / . . / . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ",
"+ + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + . . / . . . . / . ( . . . . / . / . . . . ( . ( . . . . / . ( . . . . / . ( . . . . / . / . . . . / . ( . . . . / . / . . . . / . ( . . . . / . . / . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ",
"+ + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + . . . / / / / . . . ( ( ( ( ~+. ~+/ / / / ~+. ~+/ / / / ~+. . ( ( ( ( ~+. ~+/ / / / ~+. ~+/ / / / ~+. . ( ( ( ( ~+. ~+/ / / / ~+. ~+/ / / / ~+. . . . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ",
"+ + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ",
"+ + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ",
"+ + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ",
"+ + . . . ]+^+/+(+_+:+<+<+[+}+|+1+2+3+4+5+6+2+7+8+9+0+9+a+b+c+8+d+e+f+c+g+h+d+i+j+k+l+i+m+j+n+o+p+n+q+r+s+ . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ",
"+ + . . . t+u+v+w+x+(+y+z+z+0+A+7+B+B+C+D+E+F+G+H+H+I+J+K+K+K+L+L+M+N+O+P+P+9+Q+R+S+T+T+U+V+W+X+Y+Z+`+ @ @ . . + + .@+@@@#@$@%@&@*@=@-@;@>@,@'@)@!@~@{@]@^@/@(@_@:@<@[@}@|@1@2@3@4@5@6@7@8@9@0@a@b@c@d@e@f@g@h@i@j@k@l@m@n@o@p@q@r@s@+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ",
"+ + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . !++ + + . + + .@+@@@#@$@%@&@*@=@-@;@>@,@'@)@!@~@{@]@^@/@(@_@:@<@[@}@|@1@2@3@4@5@6@7@8@9@0@a@b@c@d@e@f@g@h@i@j@k@l@m@n@o@p@q@r@s@+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + "};