Remove trailing whitespaces

This commit is contained in:
Christian Göttsche 2020-08-21 10:37:33 +02:00
parent 3856bf574b
commit b92f62f912
26 changed files with 64 additions and 86 deletions

View File

@ -615,4 +615,3 @@ void Action_setBindings(Htop_Action* keys) {
keys['c'] = actionTagAllChildren; keys['c'] = actionTagAllChildren;
keys['e'] = actionShowEnvScreen; keys['e'] = actionShowEnvScreen;
} }

View File

@ -52,5 +52,4 @@ Donations
--------- ---------
If you like htop, feel free to [buy the author a If you like htop, feel free to [buy the author a
beer](http://hisham.hm/htop/index.php?page=donate). :-) beer](http://hisham.hm/htop/index.php?page=donate). :-)

View File

@ -353,4 +353,3 @@ Public License instead of this License.
applicable licenses of the version of PLPA used in your combined work, applicable licenses of the version of PLPA used in your combined work,
provided that you include the source code of such version of PLPA when provided that you include the source code of such version of PLPA when
and as the GNU GPL requires distribution of source code. and as the GNU GPL requires distribution of source code.

View File

@ -219,7 +219,7 @@ What's new in version 1.0.2
What's new in version 1.0.1 What's new in version 1.0.1
* Move .htoprc to XDG-compliant path ~/.config/htop/htoprc, * Move .htoprc to XDG-compliant path ~/.config/htop/htoprc,
respecting $XDG_CONFIG_HOME respecting $XDG_CONFIG_HOME
(thanks to Hadzhimurad Ustarkhan for the suggestion.) (thanks to Hadzhimurad Ustarkhan for the suggestion.)
* Safer behavior on the kill screen, to make it harder to kill the wrong process. * Safer behavior on the kill screen, to make it harder to kill the wrong process.
* Fix for building in FreeBSD 8.2 * Fix for building in FreeBSD 8.2
@ -607,7 +607,7 @@ What's new in version 0.3.1
What's new in version 0.3 What's new in version 0.3
* BUGFIX: no dirt left on screen on horizontal scrolling * BUGFIX: no dirt left on screen on horizontal scrolling
* Signal selection on "kill" command * Signal selection on "kill" command
* Color-coding for users, nice and process status * Color-coding for users, nice and process status
* "Follow" function * "Follow" function

View File

@ -164,4 +164,3 @@ void ColumnsPanel_update(Panel* super) {
} }
this->settings->fields[size] = 0; this->settings->fields[size] = 0;
} }

View File

@ -85,4 +85,3 @@ long ListItem_compare(const void* cast1, const void* cast2) {
ListItem* obj2 = (ListItem*) cast2; ListItem* obj2 = (ListItem*) cast2;
return strcmp(obj1->value, obj2->value); return strcmp(obj1->value, obj2->value);
} }

1
NEWS
View File

@ -2,4 +2,3 @@
See the commit history for news of the past. See the commit history for news of the past.
See the bug tracker for news of the future. See the bug tracker for news of the future.
Run the program for news of the present. Run the program for news of the present.

View File

@ -4,47 +4,47 @@ Main screen:
For all views, all modes: For all views, all modes:
Mouse click header - nothing happens. Mouse click header - nothing happens.
Mouse click on ProcessList title bar - exit Tree view, update FunctionBar, title bar updates, sort by clicked field. Mouse click on ProcessList title bar - exit Tree view, update FunctionBar, title bar updates, sort by clicked field.
*** FAILING: wrong FB update depending on mode; does not change sort in wip branch *** FAILING: wrong FB update depending on mode; does not change sort in wip branch
click on same entry - invert sort. click on same entry - invert sort.
click on another entry - sort another field. click on another entry - sort another field.
Mouse click on a process - select that process. Mouse click on a process - select that process.
for each entry in FunctionBar: for each entry in FunctionBar:
Mouse click entry - perform action of associated key. Mouse click entry - perform action of associated key.
In Normal mode, Sorted view: In Normal mode, Sorted view:
<+> or <-> - do nothing. <+> or <-> - do nothing.
<F6> - enter SortBy screen. <F6> - enter SortBy screen.
In Normal mode, Tree view: In Normal mode, Tree view:
select process - update F6 in FunctionBar if subtree is collapsed or expanded. select process - update F6 in FunctionBar if subtree is collapsed or expanded.
<F6>, <+> or <-> - expand/collapse subtree. <F6>, <+> or <-> - expand/collapse subtree.
In Normal mode, either Sorted or Tree view: In Normal mode, either Sorted or Tree view:
<F3>, </> - activate Search mode. <F3>, </> - activate Search mode.
<F4>, <\> - activate Filter mode. <F4>, <\> - activate Filter mode.
<F7>, <]> - as root only, decrease process NICE value. <F7>, <]> - as root only, decrease process NICE value.
<F8>, <[> - increase process NICE value. <F8>, <[> - increase process NICE value.
<a> - enter Affinity screen. <a> - enter Affinity screen.
<b> - do nothing. <b> - do nothing.
<c> - select process and all its children. <c> - select process and all its children.
<d>, <e>, <f>, <g> - do nothing. <d>, <e>, <f>, <g> - do nothing.
<F1>, <h>, <?> - enter Help screen. <F1>, <h>, <?> - enter Help screen.
<i> - on Linux, enter IOPriority screen. <i> - on Linux, enter IOPriority screen.
@ -64,67 +64,67 @@ Main screen:
<s> - enter STrace screen. <s> - enter STrace screen.
<F5>, <t> - toggle between Tree and Sorted view, update F5 in FunctionBar, follow process <F5>, <t> - toggle between Tree and Sorted view, update F5 in FunctionBar, follow process
<u> - enter User screen. <u> - enter User screen.
<v>, <w>, <x>, <y>, <z> - do nothing. <v>, <w>, <x>, <y>, <z> - do nothing.
<A>, <B> - do nothing. <A>, <B> - do nothing.
<F2>, <C>, <S> - enter Setup screen. <F2>, <C>, <S> - enter Setup screen.
<D>, <E> - do nothing. <D>, <E> - do nothing.
<F> - follow process. <F> - follow process.
<G> - do nothing. <G> - do nothing.
<H> - toggle show/hide userland threads. <H> - toggle show/hide userland threads.
<I> - invert sort order. <I> - invert sort order.
<J> - do nothing. <J> - do nothing.
<K> - toggle show/hide kernel threads. <K> - toggle show/hide kernel threads.
<L> - do nothing. <L> - do nothing.
<M> - enter Sorted view, update function bar, sort by MEM%. <M> - enter Sorted view, update function bar, sort by MEM%.
<N>, <O> - do nothing. <N>, <O> - do nothing.
<P> - enter Sorted view, update function bar, sort by CPU%. <P> - enter Sorted view, update function bar, sort by CPU%.
<Q>, <R> - do nothing. <Q>, <R> - do nothing.
<T> - enter Sorted view, update function bar, sort by TIME. <T> - enter Sorted view, update function bar, sort by TIME.
<U> - untag all processes. <U> - untag all processes.
<V>, <W>, <X>, <Y>, <Z> - do nothing. <V>, <W>, <X>, <Y>, <Z> - do nothing.
<<>, <>>, <,>, <.> - enter SortBy screen. <<>, <>>, <,>, <.> - enter SortBy screen.
space - tag current process, move down cursor. space - tag current process, move down cursor.
numbers - incremental PID search. numbers - incremental PID search.
In Search mode: In Search mode:
TODO TODO
In Filter mode: In Filter mode:
TODO TODO
Setup screen: Setup screen:
TODO TODO
SortBy screen: SortBy screen:
TODO TODO
User screen: User screen:
TODO TODO
@ -136,7 +136,7 @@ Kill screen:
Affinity screen: Affinity screen:
TODO TODO
Help screen: Help screen:
any key - back to Main screen. any key - back to Main screen.
@ -152,4 +152,3 @@ STrace screen:
LSOF screen: LSOF screen:
TODO TODO

View File

@ -223,7 +223,7 @@ else
HTOP_CHECK_LIB([ncurses], [refresh], [HAVE_LIBNCURSES], HTOP_CHECK_LIB([ncurses], [refresh], [HAVE_LIBNCURSES],
missing_libraries="$missing_libraries libncurses" missing_libraries="$missing_libraries libncurses"
)))) ))))
AC_CHECK_HEADERS([curses.h],[:], AC_CHECK_HEADERS([curses.h],[:],
[AC_CHECK_HEADERS([ncurses/curses.h],[:], [AC_CHECK_HEADERS([ncurses/curses.h],[:],
[AC_CHECK_HEADERS([ncurses/ncurses.h],[:], [AC_CHECK_HEADERS([ncurses/ncurses.h],[:],

View File

@ -72,4 +72,3 @@ void Battery_getData(double* level, ACPresence* isOnAC) {
CFRelease(power_sources); CFRelease(power_sources);
} }
} }

View File

@ -32,4 +32,3 @@ void CRT_handleSIGSEGV(int sgn) {
#endif #endif
abort(); abort();
} }

View File

@ -32,4 +32,3 @@ void CRT_handleSIGSEGV(int sgn) {
#endif #endif
abort(); abort();
} }

View File

@ -18,4 +18,3 @@ void CRT_handleSIGSEGV(int sgn) {
fprintf(stderr, "\nPlease contact your platform package maintainer!\n\n"); fprintf(stderr, "\nPlease contact your platform package maintainer!\n\n");
abort(); abort();
} }

View File

@ -2,11 +2,11 @@
.SH "NAME" .SH "NAME"
htop \- interactive process viewer htop \- interactive process viewer
.SH "SYNOPSIS" .SH "SYNOPSIS"
.LP .LP
.B htop .B htop
.RB [ \-dChpustv ] .RB [ \-dChpustv ]
.SH "DESCRIPTION" .SH "DESCRIPTION"
.LP .LP
.B htop .B htop
is a cross-platform ncurses-based process viewer. is a cross-platform ncurses-based process viewer.
.LP .LP
@ -20,11 +20,11 @@ multiple processes and acting on them all at once.
.LP .LP
Tasks related to processes (killing, renicing) can be done without Tasks related to processes (killing, renicing) can be done without
entering their PIDs. entering their PIDs.
.br .br
.SH "COMMAND-LINE OPTIONS" .SH "COMMAND-LINE OPTIONS"
.LP .LP
Mandatory arguments to long options are mandatory for short options too. Mandatory arguments to long options are mandatory for short options too.
.LP .LP
.TP .TP
\fB\-d \-\-delay=DELAY\fR \fB\-d \-\-delay=DELAY\fR
Delay between updates, in tenths of seconds. If the delay value is Delay between updates, in tenths of seconds. If the delay value is
@ -54,10 +54,10 @@ Output version information and exit
\fB\-t \-\-tree \fB\-t \-\-tree
Show processes in tree view Show processes in tree view
.SH "INTERACTIVE COMMANDS" .SH "INTERACTIVE COMMANDS"
.LP .LP
The following commands are supported while in The following commands are supported while in
.BR htop : .BR htop :
.LP .LP
.TP 5 .TP 5
.B Up, Alt-k .B Up, Alt-k
Select (highlight) the previous process in the process list. Scroll the list Select (highlight) the previous process in the process list. Scroll the list
@ -159,7 +159,7 @@ Quit
Invert the sort order: if sort order is increasing, switch to decreasing, and Invert the sort order: if sort order is increasing, switch to decreasing, and
vice-versa. vice-versa.
.TP .TP
.B +, \- .B +, \-
When in tree view mode, expand or collapse subtree. When a subtree is collapsed When in tree view mode, expand or collapse subtree. When a subtree is collapsed
a "+" sign shows to the left of the process name. a "+" sign shows to the left of the process name.
.TP .TP
@ -203,7 +203,7 @@ Refresh: redraw screen and recalculate values.
PID search: type in process ID and the selection highlight will be moved to it. PID search: type in process ID and the selection highlight will be moved to it.
.PD .PD
.SH "COLUMNS" .SH "COLUMNS"
.LP .LP
The following columns can display data about each process. A value of '\-' in The following columns can display data about each process. A value of '\-' in
all the rows indicates that a column is unsupported on your system, or all the rows indicates that a column is unsupported on your system, or
currently unimplemented in currently unimplemented in
@ -213,11 +213,11 @@ The names below are the ones used in the
shown in shown in
.BR htop 's .BR htop 's
main screen, it is shown below in parenthesis. main screen, it is shown below in parenthesis.
.LP .LP
.TP 5 .TP 5
.B Command .B Command
The full command line of the process (i.e. program name and arguments). The full command line of the process (i.e. program name and arguments).
.TP .TP
.B PID .B PID
The process ID. The process ID.
.TP .TP
@ -238,7 +238,7 @@ The process's group ID.
.TP .TP
.B SESSION (SID) .B SESSION (SID)
The process's session ID. The process's session ID.
.TP .TP
.B TTY_NR (TTY) .B TTY_NR (TTY)
The controlling terminal of the process. The controlling terminal of the process.
.TP .TP
@ -401,7 +401,7 @@ The percentage of time spent swapping in pages. Requires CAP_NET_ADMIN.
.B All other flags .B All other flags
Currently unsupported (always displays '-'). Currently unsupported (always displays '-').
.SH "CONFIG FILE" .SH "CONFIG FILE"
.LP .LP
By default By default
.B htop .B htop
reads its configuration from the XDG-compliant path reads its configuration from the XDG-compliant path
@ -437,7 +437,7 @@ space and make memory size representations consistent throughout
and and
.BR limits.conf (5). .BR limits.conf (5).
.SH "AUTHORS" .SH "AUTHORS"
.LP .LP
.B htop .B htop
was originally developed by Hisham Muhammad. was originally developed by Hisham Muhammad.
Nowadays it is maintained by the community at <htop@groups.io>. Nowadays it is maintained by the community at <htop@groups.io>.

View File

@ -38,4 +38,3 @@ typedef int IOPriority;
#define IOPriority_Idle IOPriority_tuple(IOPRIO_CLASS_IDLE, 7) #define IOPriority_Idle IOPriority_tuple(IOPRIO_CLASS_IDLE, 7)
}*/ }*/

View File

@ -41,4 +41,3 @@ Panel* IOPriorityPanel_new(IOPriority currPrio) {
IOPriority IOPriorityPanel_getIOPriority(Panel* this) { IOPriority IOPriorityPanel_getIOPriority(Panel* this) {
return (IOPriority) ( ((ListItem*) Panel_getSelected(this))->key ); return (IOPriority) ( ((ListItem*) Panel_getSelected(this))->key );
} }

View File

@ -514,4 +514,3 @@ long LinuxProcess_compare(const void* v1, const void* v2) {
bool Process_isThread(Process* this) { bool Process_isThread(Process* this) {
return (Process_isUserlandThread(this) || Process_isKernelThread(this)); return (Process_isUserlandThread(this) || Process_isKernelThread(this));
} }

View File

@ -19,4 +19,3 @@ void CRT_handleSIGSEGV(int sgn) {
fprintf(stderr, "\nPlease contact your platform package maintainer!\n\n"); fprintf(stderr, "\nPlease contact your platform package maintainer!\n\n");
abort(); abort();
} }

View File

@ -400,4 +400,3 @@ void ProcessList_goThroughEntries(ProcessList* this) {
OpenBSDProcessList_scanProcs(opl); OpenBSDProcessList_scanProcs(opl);
OpenBSDProcessList_scanCPUTime(opl); OpenBSDProcessList_scanCPUTime(opl);
} }

View File

@ -5,4 +5,3 @@ void Battery_getData(double* level, ACPresence* isOnAC) {
*level = -1; *level = -1;
*isOnAC = AC_ERROR; *isOnAC = AC_ERROR;
} }

View File

@ -419,4 +419,3 @@ void ProcessList_goThroughEntries(ProcessList* this) {
this->kernelThreads = 1; this->kernelThreads = 1;
proc_walk(&SolarisProcessList_walkproc, this, PR_WALK_LWP); proc_walk(&SolarisProcessList_walkproc, this, PR_WALK_LWP);
} }

View File

@ -1,7 +1,7 @@
#!/usr/bin/env lua #!/usr/bin/env lua
local VISUALDELAY = os.getenv("VISUALDELAY") local VISUALDELAY = os.getenv("VISUALDELAY")
local visual = VISUALDELAY or false local visual = VISUALDELAY or false
local visual_delay = VISUALDELAY and (tonumber(VISUALDELAY)) or 0.1 local visual_delay = VISUALDELAY and (tonumber(VISUALDELAY)) or 0.1
local short_delay = 0.3 local short_delay = 0.3
@ -70,7 +70,7 @@ local function show(key)
term_win:mvaddstr(0, 0, tostring(key)) term_win:mvaddstr(0, 0, tostring(key))
end end
term_win:refresh() term_win:refresh()
delay(visual_delay) delay(visual_delay)
end end
end end
@ -191,7 +191,7 @@ local function set_display_option(n)
end end
describe("htop test suite", function() describe("htop test suite", function()
running_it("performs incremental filter", function() running_it("performs incremental filter", function()
send("\\") send("\\")
send("x\127bux\127sted") -- test backspace send("x\127bux\127sted") -- test backspace
@ -397,13 +397,13 @@ describe("htop test suite", function()
assert.not_equal(pair[1], pair[2]) assert.not_equal(pair[1], pair[2])
end end
end) end)
running_it("visits each setup screen", function() running_it("visits each setup screen", function()
send("S") send("S")
send(curses.KEY_DOWN, 3) send(curses.KEY_DOWN, 3)
send(curses.KEY_F10) send(curses.KEY_F10)
end) end)
running_it("adds and removes PPID column", function() running_it("adds and removes PPID column", function()
send("S") send("S")
send(curses.KEY_DOWN, 3) send(curses.KEY_DOWN, 3)
@ -423,7 +423,7 @@ describe("htop test suite", function()
assert.equal(check(ppid)) assert.equal(check(ppid))
assert.not_equal(check(not_ppid)) assert.not_equal(check(not_ppid))
end) end)
running_it("changes CPU affinity for a process", function() running_it("changes CPU affinity for a process", function()
send("a") send("a")
send(" \n") send(" \n")
@ -468,7 +468,7 @@ describe("htop test suite", function()
assert.equal(check(zerocpu)) assert.equal(check(zerocpu))
assert.not_equal(check(nonzerocpu)) assert.not_equal(check(nonzerocpu))
end) end)
running_it("changes IO priority for a process", function() running_it("changes IO priority for a process", function()
send("/") send("/")
send("htop") send("htop")
@ -502,7 +502,7 @@ describe("htop test suite", function()
send("\n") send("\n")
send(curses.KEY_F10) send(curses.KEY_F10)
end) end)
local meters = { local meters = {
{ name = "clock", down = 0, string = "Time" }, { name = "clock", down = 0, string = "Time" },
{ name = "load", down = 2, string = "Load" }, { name = "load", down = 2, string = "Load" },
@ -558,7 +558,7 @@ describe("htop test suite", function()
send("\n") send("\n")
send(curses.KEY_F10) send(curses.KEY_F10)
end) end)
local display_options = { local display_options = {
{ name = "tree view", down = 0 }, { name = "tree view", down = 0 },
{ name = "shadow other user's process", down = 1 }, { name = "shadow other user's process", down = 1 },
@ -574,7 +574,7 @@ describe("htop test suite", function()
{ name = "update process names", down = 11 }, { name = "update process names", down = 11 },
{ name = "guest time in CPU%", down = 12 }, { name = "guest time in CPU%", down = 12 },
} }
for _, item in ipairs(display_options) do for _, item in ipairs(display_options) do
running_it("checks display option to "..item.name, function() running_it("checks display option to "..item.name, function()
for _ = 1, 2 do for _ = 1, 2 do
@ -641,7 +641,7 @@ describe("htop test suite", function()
assert.equal(attrs.white_on_black, untaggedattr) assert.equal(attrs.white_on_black, untaggedattr)
end end
end) end)
for i = 1, 62 do for i = 1, 62 do
running_it("show column "..i, function() running_it("show column "..i, function()
send("S") send("S")
@ -670,7 +670,7 @@ describe("htop test suite", function()
end end
end) end)
end end
it("finally quits", function() it("finally quits", function()
assert(not terminated()) assert(not terminated())
send("q") send("q")
@ -685,4 +685,3 @@ describe("htop test suite", function()
os.execute("make lcov && xdg-open lcov/index.html") os.execute("make lcov && xdg-open lcov/index.html")
end) end)
end) end)

View File

@ -5,4 +5,3 @@ void Battery_getData(double* level, ACPresence* isOnAC) {
*level = -1; *level = -1;
*isOnAC = AC_ERROR; *isOnAC = AC_ERROR;
} }

View File

@ -18,4 +18,3 @@ void CRT_handleSIGSEGV(int sgn) {
fprintf(stderr, "\nPlease contact your platform package maintainer!\n\n"); fprintf(stderr, "\nPlease contact your platform package maintainer!\n\n");
abort(); abort();
} }

View File

@ -30,4 +30,3 @@ void UnsupportedProcess_delete(Object* cast) {
// free platform-specific fields here // free platform-specific fields here
free(this); free(this);
} }

View File

@ -93,7 +93,7 @@ MeterClass ZfsArcMeter_class = {
.delete = Meter_delete, .delete = Meter_delete,
.display = ZfsArcMeter_display, .display = ZfsArcMeter_display,
}, },
.updateValues = ZfsArcMeter_updateValues, .updateValues = ZfsArcMeter_updateValues,
.defaultMode = TEXT_METERMODE, .defaultMode = TEXT_METERMODE,
.maxItems = 6, .maxItems = 6,
.total = 100.0, .total = 100.0,