Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 19 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
name: CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
on: [ push, pull_request ]

jobs:
build-ubuntu-latest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Dependencies
run: sudo apt-get install libncursesw5-dev
- name: Bootstrap
run: ./autogen.sh
- name: Configure
run: ./configure --enable-werror
- name: Build
run: |
sudo apt-get install libncursesw5-dev
./autogen.sh
./configure
make
run: make
- name: Distcheck
run: make distcheck

# build-macos-latest:
# runs-on: macos-latest
Expand All @@ -27,3 +27,12 @@ jobs:
# ./autogen.sh
# ./configure
# make

whitespace_check:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: check-whitespaces
run: git diff-tree --check $(git hash-object -t tree /dev/null) HEAD
1 change: 0 additions & 1 deletion Action.c
Original file line number Diff line number Diff line change
Expand Up @@ -615,4 +615,3 @@ void Action_setBindings(Htop_Action* keys) {
keys['c'] = actionTagAllChildren;
keys['e'] = actionShowEnvScreen;
}

3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,4 @@ Donations
---------

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). :-)
1 change: 0 additions & 1 deletion COPYING
Original file line number Diff line number Diff line change
Expand Up @@ -353,4 +353,3 @@ Public License instead of this License.
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
and as the GNU GPL requires distribution of source code.

4 changes: 2 additions & 2 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ What's new in version 1.0.2
What's new in version 1.0.1

* Move .htoprc to XDG-compliant path ~/.config/htop/htoprc,
respecting $XDG_CONFIG_HOME
respecting $XDG_CONFIG_HOME
(thanks to Hadzhimurad Ustarkhan for the suggestion.)
* Safer behavior on the kill screen, to make it harder to kill the wrong process.
* Fix for building in FreeBSD 8.2
Expand Down Expand Up @@ -607,7 +607,7 @@ What's new in version 0.3.1

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
* Color-coding for users, nice and process status
* "Follow" function
Expand Down
1 change: 0 additions & 1 deletion ColumnsPanel.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,4 +164,3 @@ void ColumnsPanel_update(Panel* super) {
}
this->settings->fields[size] = 0;
}

1 change: 0 additions & 1 deletion ListItem.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,3 @@ long ListItem_compare(const void* cast1, const void* cast2) {
ListItem* obj2 = (ListItem*) cast2;
return strcmp(obj1->value, obj2->value);
}

2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ applications_DATA = htop.desktop
pixmapdir = $(datadir)/pixmaps
pixmap_DATA = htop.png

AM_CFLAGS = -pedantic -Wall $(wextra_flag) -std=c99 -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"$(sysconfdir)\" -I"$(top_srcdir)/$(my_htop_platform)"
AM_CFLAGS += -pedantic -Wall $(wextra_flag) -std=c99 -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"$(sysconfdir)\" -I"$(top_srcdir)/$(my_htop_platform)"
AM_LDFLAGS =
AM_CPPFLAGS = -DNDEBUG

Expand Down
1 change: 0 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
See the commit history for news of the past.
See the bug tracker for news of the future.
Run the program for news of the present.

69 changes: 34 additions & 35 deletions TESTPLAN
Original file line number Diff line number Diff line change
Expand Up @@ -4,47 +4,47 @@ Main screen:
For all views, all modes:

Mouse click header - nothing happens.

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
click on same entry - invert sort.
click on another entry - sort another field.

Mouse click on a process - select that process.

for each entry in FunctionBar:
Mouse click entry - perform action of associated key.

In Normal mode, Sorted view:

<+> or <-> - do nothing.

<F6> - enter SortBy screen.

In Normal mode, Tree view:

select process - update F6 in FunctionBar if subtree is collapsed or expanded.

<F6>, <+> or <-> - expand/collapse subtree.

In Normal mode, either Sorted or Tree view:

<F3>, </> - activate Search mode.

<F4>, <\> - activate Filter mode.

<F7>, <]> - as root only, decrease process NICE value.

<F8>, <[> - increase process NICE value.

<a> - enter Affinity screen.

<b> - do nothing.

<c> - select process and all its children.

<d>, <e>, <f>, <g> - do nothing.

<F1>, <h>, <?> - enter Help screen.

<i> - on Linux, enter IOPriority screen.
Expand All @@ -64,67 +64,67 @@ Main screen:
<s> - enter STrace screen.

<F5>, <t> - toggle between Tree and Sorted view, update F5 in FunctionBar, follow process

<u> - enter User screen.

<v>, <w>, <x>, <y>, <z> - do nothing.

<A>, <B> - do nothing.

<F2>, <C>, <S> - enter Setup screen.

<D>, <E> - do nothing.

<F> - follow process.

<G> - do nothing.

<H> - toggle show/hide userland threads.

<I> - invert sort order.

<J> - do nothing.

<K> - toggle show/hide kernel threads.

<L> - do nothing.

<M> - enter Sorted view, update function bar, sort by MEM%.

<N>, <O> - do nothing.

<P> - enter Sorted view, update function bar, sort by CPU%.

<Q>, <R> - do nothing.

<T> - enter Sorted view, update function bar, sort by TIME.

<U> - untag all processes.

<V>, <W>, <X>, <Y>, <Z> - do nothing.

<<>, <>>, <,>, <.> - enter SortBy screen.

space - tag current process, move down cursor.

numbers - incremental PID search.

In Search mode:

TODO

In Filter mode:

TODO

Setup screen:

TODO

SortBy screen:

TODO

User screen:

TODO
Expand All @@ -136,7 +136,7 @@ Kill screen:
Affinity screen:

TODO

Help screen:

any key - back to Main screen.
Expand All @@ -152,4 +152,3 @@ STrace screen:
LSOF screen:

TODO

6 changes: 5 additions & 1 deletion XAlloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <stdlib.h>
}*/

static inline void fail() {
void fail() {
curs_set(1);
endwin();
err(1, NULL);
Expand Down Expand Up @@ -44,6 +44,10 @@ void* xRealloc(void* ptr, size_t size) {
return data;
}

#undef xAsprintf

#define xAsprintf(strp, fmt, ...) do { int _r=asprintf(strp, fmt, __VA_ARGS__); if (_r < 0) { fail(); } } while(0)

#define xSnprintf(fmt, len, ...) do { int _l=len; int _n=snprintf(fmt, _l, __VA_ARGS__); if (!(_n > -1 && _n < _l)) { curs_set(1); endwin(); err(1, NULL); } } while(0)

#undef xStrdup
Expand Down
6 changes: 6 additions & 0 deletions XAlloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,18 @@
#include <assert.h>
#include <stdlib.h>

extern void fail(void);

extern void* xMalloc(size_t size);

extern void* xCalloc(size_t nmemb, size_t size);

extern void* xRealloc(void* ptr, size_t size);

#undef xAsprintf

#define xAsprintf(strp, fmt, ...) do { int _r=asprintf(strp, fmt, __VA_ARGS__); if (_r < 0) { fail(); } } while(0)

#define xSnprintf(fmt, len, ...) do { int _l=len; int _n=snprintf(fmt, _l, __VA_ARGS__); if (!(_n > -1 && _n < _l)) { curs_set(1); endwin(); err(1, NULL); } } while(0)

#undef xStrdup
Expand Down
5 changes: 4 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ else
HTOP_CHECK_LIB([ncurses], [refresh], [HAVE_LIBNCURSES],
missing_libraries="$missing_libraries libncurses"
))))

AC_CHECK_HEADERS([curses.h],[:],
[AC_CHECK_HEADERS([ncurses/curses.h],[:],
[AC_CHECK_HEADERS([ncurses/ncurses.h],[:],
Expand Down Expand Up @@ -295,6 +295,9 @@ then
])
fi

AC_ARG_ENABLE([werror], [AS_HELP_STRING([--enable-werror], [Treat warnings as errors (default: warnings are not errors)])], [enable_werror="$enableval"], [enable_werror=no])
AS_IF([test "x$enable_werror" = "xyes"], [AM_CFLAGS="$AM_CFLAGS -Werror"])
AC_SUBST([AM_CFLAGS])

# Bail out on errors.
# ----------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion darwin/Battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,3 @@ void Battery_getData(double* level, ACPresence* isOnAC) {
CFRelease(power_sources);
}
}

1 change: 0 additions & 1 deletion darwin/DarwinCRT.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,3 @@ void CRT_handleSIGSEGV(int sgn) {
#endif
abort();
}

1 change: 0 additions & 1 deletion dragonflybsd/DragonFlyBSDCRT.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,3 @@ void CRT_handleSIGSEGV(int sgn) {
#endif
abort();
}

1 change: 0 additions & 1 deletion freebsd/FreeBSDCRT.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ void CRT_handleSIGSEGV(int sgn) {
fprintf(stderr, "\nPlease contact your platform package maintainer!\n\n");
abort();
}

Loading