[Pkg-wmaker-commits] [wmmon] 13/38: Remove trailing whitespace.
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Sat Aug 12 22:43:07 UTC 2017
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch upstream
in repository wmmon.
commit f8215672b856eab1157ea61d0cf76353c29c44e5
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date: Sun Oct 5 10:29:59 2014 -0500
Remove trailing whitespace.
---
CHANGES | 12 +++++------
HINTS | 8 +++----
README | 22 +++++++++----------
TODO | 2 +-
wmgeneral/list.c | 12 +++++------
wmgeneral/list.h | 2 +-
wmgeneral/misc.c | 24 ++++++++++-----------
wmgeneral/wmgeneral.c | 20 ++++++++---------
wmmon/Makefile | 2 +-
wmmon/wmmon-mask.xbm | 8 +++----
wmmon/wmmon.1 | 2 +-
wmmon/wmmon.c | 60 +++++++++++++++++++++++++--------------------------
12 files changed, 87 insertions(+), 87 deletions(-)
diff --git a/CHANGES b/CHANGES
index 4eaedd3..5b4ce11 100644
--- a/CHANGES
+++ b/CHANGES
@@ -3,24 +3,24 @@ WMMon changes.
Version Description
--------------------------------------------------------------
1.2b1 - Released 20120325
- - I/O monitor - updated to use /proc/diskstats instead
- of obsolete /proc/stat interface, which is no longer
+ - I/O monitor - updated to use /proc/diskstats instead
+ of obsolete /proc/stat interface, which is no longer
present in post 2.6 kernels. TODO: The non-/proc based
solutions used in the various BSD ports trees should
be incorporated into mainline version.
- I/O monitor - Fixed scaling issues with graph caused
- by improper use of static data. The graph would
+ by improper use of static data. The graph would
continually scale up, making smaller values invisible.
Eventually the system would appear to be idle, only
graphing the biggest spikes. A similar issue affecting
- the upper-right meter is also fixed. Meter scaling is
+ the upper-right meter is also fixed. Meter scaling is
recalibrated every couple of minutes to avoid losing
meter funtionality after anomalously large peaks.
- I/O Monitor - Fixed rounding errors caused by use of
integer types, which were causing relatively small
values not to appear on graph or meter. Added code to
round very low values up, so they will appear on meter
- and graph.
+ and graph.
- ONGOING: Style edits to improve readability and
maintainability (removing hardcoded values, adding
newlines to "if" conditions, etc).
@@ -36,7 +36,7 @@ Version Description
& cached mem are no longer being displayed;
- Added -i & -s parameters to select startupmode, based
on diff by Brendan Knox (knoxy at origob.demon.co.uk);
-
+
1.0b1 - Released 980513
- First initial stable public BETA release.
diff --git a/HINTS b/HINTS
index cbf50e4..583a0f3 100644
--- a/HINTS
+++ b/HINTS
@@ -4,7 +4,7 @@ Generic
--------------------------------------------------------------
WMMon supports 5 commandline options:
- -h (help);
+ -h (help);
-v (prints);
-d (display);
-i (startup in DiskI/O mode);
@@ -20,11 +20,11 @@ right: mycommand-3 &
If wmmon detects a ~/.wmmonrc file, it will launch your defined
command(s) when you click in the average load display area.
-WMMon can cycle in realtime between CPU, Disk I/O and the
+WMMon can cycle in realtime between CPU, Disk I/O and the
SysInfo displays by simply left clicking on the upperleft
gadget (which displays CPU info by default).
-Be sure to drag WMMon on it's outer edges, WMMon is a bit picky
+Be sure to drag WMMon on it's outer edges, WMMon is a bit picky
due to the large gfx pixmap it keeps ;-)
@@ -43,7 +43,7 @@ Afterstep users put the following in their .steprc
Note: AfterStep's Wharf 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!
-
+
Other WindowManagers
--------------------------------------------------------------
diff --git a/README b/README
index ba5cc9e..6fcc7a0 100644
--- a/README
+++ b/README
@@ -2,23 +2,23 @@ WMMon-1.0b2 - Public BETA release
--------------------------------------------------------------
Authors...: Martijn Pieterse (pieterse at xs4all.nl)
Antoine Nulle (warp at xs4all.nl)
-
+
Note......: WMMon has it's own mailbox, as our pop3 accounts
are already way too crowded :)
Please mail bugreports, comments, suggestions,
requests and flames to:
dockapps at windowmaker.mezaway.org
-
+
The official WMMon support website address:
-
+
http://windowmaker.mezaway.org
-
+
Credits...: Bobby Mezaway (bobby at mezaway.org) for generously
- hosting our website!
+ hosting our website!
Dave Harden (dharden at wisewire.com) for the major
- speedup diffs!
-
+ speedup diffs!
+
Description
--------------------------------------------------------------
@@ -43,7 +43,7 @@ WMMon currently provides:
There are some 'known' unfinished parts, be sure to read the TODO
file, but we decided to release it early because of the high
demand and many requests we got for this one ;)
-
+
WMMon is being developped on DEC Alpha machines running
Linux/RedHat-5.0, but, WMMon has been intensively tested
on x86 and 68K Linux machines too ;-)
@@ -59,11 +59,11 @@ BUGS Things you don't want to know ;-)
CHANGES Description of changes.
COPYING GNU General Public License Version 2.
TODO Stuff we've planned for future WMMon releases.
-
+
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 dockapps at windowmaker.mezaway.org and describe
the problem as detailed as you can.
@@ -71,7 +71,7 @@ the problem as detailed as you can.
Copyright
--------------------------------------------------------------
WMMon.app is copyright (c) 1997, 1998 by Martijn Pieterse and
-Antoine Nulle and licensed through the GNU General Public License.
+Antoine Nulle and licensed through the GNU General Public License.
Read the COPYING file for the complete GNU license.
diff --git a/TODO b/TODO
index af01ebb..e0d9cd2 100644
--- a/TODO
+++ b/TODO
@@ -7,7 +7,7 @@ This is a list of things we've already planned for WMMon-1.0:
* Lower CPU usage (only in SysInfo mode) CPU and I/O
mode are very low in CPU usage now ;-);
* Multiple CPU support;
- * GUI mode for simultanious CPU/IO/MEM&SWAP realtime
+ * GUI mode for simultanious CPU/IO/MEM&SWAP realtime
loadbars (like Matt suggested ;-) );
Your feedback! If you have nice suggestions, ideas, whatever,
diff --git a/wmgeneral/list.c b/wmgeneral/list.c
index be7464f..a63562f 100644
--- a/wmgeneral/list.c
+++ b/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 02110-1301 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/wmgeneral/list.h b/wmgeneral/list.h
index 4b6b86f..92c3454 100644
--- a/wmgeneral/list.h
+++ b/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/wmgeneral/misc.c b/wmgeneral/misc.c
index f86481e..1f3bb2e 100644
--- a/wmgeneral/misc.c
+++ b/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/wmgeneral/wmgeneral.c b/wmgeneral/wmgeneral.c
index 34b4e05..b4865bc 100644
--- a/wmgeneral/wmgeneral.c
+++ b/wmgeneral/wmgeneral.c
@@ -128,7 +128,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);
@@ -175,9 +175,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,
@@ -189,9 +189,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,
@@ -286,14 +286,14 @@ 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];
else if (!strcmp(argv[i], "-geometry"))
geometry = argv[++i];
}
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);
}
@@ -322,10 +322,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);
@@ -346,7 +346,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/wmmon/Makefile b/wmmon/Makefile
index c49b0d3..a767ba0 100755
--- a/wmmon/Makefile
+++ b/wmmon/Makefile
@@ -15,7 +15,7 @@ CC = cc
wmmon: $(OBJS)
$(CC) $(LDFLAGS) -o wmmon $^ $(LIBDIR) $(LIBS)
-debug: CFLAGS = -g3
+debug: CFLAGS = -g3
debug: wmmon
clean::
diff --git a/wmmon/wmmon-mask.xbm b/wmmon/wmmon-mask.xbm
index 3289657..43b85a4 100644
--- a/wmmon/wmmon-mask.xbm
+++ b/wmmon/wmmon-mask.xbm
@@ -1,10 +1,10 @@
#define wmmon_mask_width 128
#define wmmon_mask_height 64
static char wmmon_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,
+ 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, 0xf3, 0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xf3, 0xff, 0xff, 0xff, 0x0f,
0xf0, 0xff, 0xff, 0xf3, 0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xf3, 0xff, 0xff, 0xff, 0x0f,
diff --git a/wmmon/wmmon.1 b/wmmon/wmmon.1
index 9326f1f..ab8f22e 100644
--- a/wmmon/wmmon.1
+++ b/wmmon/wmmon.1
@@ -158,7 +158,7 @@ middle: xload
.PP
right: xcalc
.PP
-.PD
+.PD
.RE
If
diff --git a/wmmon/wmmon.c b/wmmon/wmmon.c
index 48f1041..b1f5303 100644
--- a/wmmon/wmmon.c
+++ b/wmmon/wmmon.c
@@ -15,7 +15,7 @@
How do I create a not so solid window?
How do I open a window?
How do I use pixmaps?
-
+
------------------------------------------------------------
Authors: Martijn Pieterse (pieterse at xs4all.nl)
@@ -58,8 +58,8 @@
18/05/1998 (Antoine Nulle, warp at xs4all.nl)
* MEM/SWAP/UPTIME only updated when visible
* Using global file descriptors to reduce file
- system overhead, both updates are based on a diff
- supplied by Dave Harden (dharden at wisewire.com)
+ system overhead, both updates are based on a diff
+ supplied by Dave Harden (dharden at wisewire.com)
15/05/1998 (Antoine Nulle, warp at xs4all.nl)
* Fixed memory overflow in the MEM gaugebar
* MEM gauge displays now real used mem
@@ -68,7 +68,7 @@
* Added -i & -s kludge for selecting startupmode,
tijno, don't hate me for this :)
12/05/1998 (Antoine Nulle, warp at xs4all.nl)
- * Finetuned master-xpm, tijno don't worry, no
+ * Finetuned master-xpm, tijno don't worry, no
reprogramming needed this time ;-)
07/05/1998 (Martijn Pieterse, pieterse at xs4all.nl)
* Added disk i/o
@@ -214,7 +214,7 @@ typedef struct {
stat_dev stat_device[MAX_STAT_DEVICES];
-char *left_action, *right_action, *middle_action;
+char *left_action, *right_action, *middle_action;
int nb_cpu, cpu_max;
int getNbCPU(void);
@@ -280,11 +280,11 @@ void wmmon_routine(int argc, char **argv)
/* wbk - I don't fully understand this. Probably just a means of providing
* test cases. ifdef'ing to clear compiler warnings. TODO: remove. */
#ifdef LEFT_ACTION
- if (LEFT_ACTION)
+ if (LEFT_ACTION)
left_action = strdup(LEFT_ACTION);
#endif
#ifdef RIGHT_ACTION
- if (RIGHT_ACTION)
+ if (RIGHT_ACTION)
right_action = strdup(RIGHT_ACTION);
#endif
#ifdef MIDDLE_ACTION
@@ -330,7 +330,7 @@ void wmmon_routine(int argc, char **argv)
exit(1);
}
- openXwindow(argc, argv, wmmon_master_xpm, wmmon_mask_bits,
+ openXwindow(argc, argv, wmmon_master_xpm, wmmon_mask_bits,
wmmon_mask_width, wmmon_mask_height);
/* add mouse region */
@@ -370,10 +370,10 @@ void wmmon_routine(int argc, char **argv)
/* Draw statistics */
if (stat_current == 0) {
- DrawStats(stat_device[stat_current].his,
+ DrawStats(stat_device[stat_current].his,
HISTORY_ENTRIES-1, 40, 5, 58);
} else if (stat_current == 1) {
- DrawStats_io(stat_device[stat_current].his,
+ DrawStats_io(stat_device[stat_current].his,
HISTORY_ENTRIES, 40, 5, 58);
}
@@ -393,7 +393,7 @@ void wmmon_routine(int argc, char **argv)
if (stat_current < 2) {
i = stat_current;
-
+
/* Load ding is 45 pixels hoog */
copyXPMArea(0, 64, 32, 12, 28, 4);
@@ -403,16 +403,16 @@ void wmmon_routine(int argc, char **argv)
j = getWidth(stat_device[i].rt_stat, stat_device[i].rt_idle);
copyXPMArea(32, 64, j, 6, 28, 4);
/* Show max CPU */
- j = getWidth(stat_device[i].cpu_stat[cpu_max],
+ j = getWidth(stat_device[i].cpu_stat[cpu_max],
stat_device[i].idle_stat[cpu_max]);
copyXPMArea(32, 70, j, 6, 28, 10);
} else {
int cpu;
for (cpu = 0; cpu < nb_cpu; cpu++) {
- j = getWidth(stat_device[i].cpu_stat[cpu],
+ j = getWidth(stat_device[i].cpu_stat[cpu],
stat_device[i].idle_stat[cpu]);
- copyXPMArea(32, 65, j,
- MAX_CPU / nb_cpu, 28,
+ copyXPMArea(32, 65, j,
+ MAX_CPU / nb_cpu, 28,
5 + (MAX_CPU / nb_cpu) * cpu);
}
}
@@ -495,18 +495,18 @@ void wmmon_routine(int argc, char **argv)
sd->his[j-1] = sd->his[j];
if (i == stat_current) {
- if (i == 0)
+ if (i == 0)
DrawStats(sd->his, HISTORY_ENTRIES - 1, 40, 5, 58);
- else if (i == 1)
+ else if (i == 1)
DrawStats_io(sd->his, HISTORY_ENTRIES - 1, 40, 5, 58);
}
sd->his[HISTORY_ENTRIES-1] = 0;
sd->hisaddcnt = 0;
-
+
}
}
RedrawWindowXY(xpm_X, xpm_Y);
-
+
while (XPending(display)) {
XNextEvent(display, &Event);
switch (Event.type) {
@@ -784,23 +784,23 @@ void get_statistics(char *devname, long *is, long *ds, long *idle, long *ds2, lo
perror("get_statistics() seek failed\n");
/* wbk 20120308 These are no longer in /proc/stat. /proc/diskstats
- * seems to be the closest replacement. Under modern BSD's, /proc is
+ * seems to be the closest replacement. Under modern BSD's, /proc is
* now deprecated, so iostat() might be the answer.
* http://www.gossamer-threads.com/lists/linux/kernel/314618
* has good info on this being removed from kernel. Also see
* kernel sources Documentation/iostats.txt
*
- * TODO: We will end up with doubled values. We are adding the
- * aggregate to the individual partition, due to device selection
- * logic. Either grab devices' stats with numbers, or without (sda
- * OR sda[1..10]. Could use strstr() return plus offset, but would
- * have to be careful with bounds checking since we're in a
- * limited buffer. Or just divide by 2 (inefficient). Shouldn't
+ * TODO: We will end up with doubled values. We are adding the
+ * aggregate to the individual partition, due to device selection
+ * logic. Either grab devices' stats with numbers, or without (sda
+ * OR sda[1..10]. Could use strstr() return plus offset, but would
+ * have to be careful with bounds checking since we're in a
+ * limited buffer. Or just divide by 2 (inefficient). Shouldn't
* matter for graphing (we care about proportions, not numbers). */
while ((getline(&line, &line_size, fp_diskstats)) > 0) {
if (strstr(line, "sd") || strstr(line, "sr")) {
p = strtok(line, tokens);
- /* skip 3 tokens, then use fields from
+ /* skip 3 tokens, then use fields from
`* linux/Documentation/iostats.txt */
for (i = 1; i <= 6; i++)
p = strtok(NULL, tokens);
@@ -835,7 +835,7 @@ unsigned long getWidth(long actif, long idle)
if (actif > 0 && j < 2)
j = 2;
- if (j > 32)
+ if (j > 32)
j = 32;
r = (unsigned long) j;
@@ -951,8 +951,8 @@ void DrawStats_io(int *his, int num, int size, int x_left, int y_bottom)
/* wbk - this should not be static. No need to track the scale, since
* we always calculate it on the fly anyway. This static variable did
- * not get re-initialized when we entered this function, so the scale
- * would always grow and never shrink.
+ * not get re-initialized when we entered this function, so the scale
+ * would always grow and never shrink.
*/
/*static int global_io_scale = 1;*/
int io_scale = 1;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmmon.git
More information about the Pkg-wmaker-commits
mailing list