Commit Graph

149 Commits

Author SHA1 Message Date
Benny Baumann 374edb9ed5 Spacing after keywords (if) 2020-11-02 22:14:59 +01:00
Benny Baumann 0a51eae11f Spacing after keywords (while) 2020-11-02 22:14:26 +01:00
Erdem Ersoy 59ef15b2ad Fix segmentation fault when column name is NULL.
So, some columns (ex: SECATTR) can be sortable now.
2020-10-31 18:34:34 +01:00
Daniel Lange 0ea18a6edb Merge branch 'Xalloc_Cleanup' of cgzones/htop 2020-10-20 10:23:47 +02:00
Christian Göttsche 4c66eb6d4c XUtils string related updates
- allow count out-parameter of String_split() to be NULL
- introduce xStrndup()
- do not allow NULL pointers passed to String_eq()
  it is not used in any code
- implement String_startsWith(), String_contains_i() and String_eq()
  as inline header functions
- adjust several conversion issues
2020-10-19 15:38:45 +02:00
Christian Göttsche 96e2a4259e Continue to update generic data in paused mode
Generic data, as CPU and memory usage, are used by Meters.
In paused mode they would stop receiving updates and especially Graph
Meters would stop showing continuous data.

Improves: #214
Closes: #253
2020-10-19 14:45:39 +02:00
Benny Baumann 0f5262917f Make all required includes explicit
Information as seen by IWYU 0.12 + clang 9 on Linux
2020-10-18 20:09:05 +02:00
Benny Baumann 872e542f4e Rename StringUtils.[ch] to XUtils.[ch] 2020-10-16 20:30:21 +02:00
Benny Baumann c6f04a9c5d Move xAsprintf, xSnprintf and xStrdup to StringUtils.h 2020-10-16 20:29:45 +02:00
Christian Göttsche af4f58d013 Misc conversion fixes 2020-10-16 19:16:53 +02:00
Christian Göttsche b47bc667a2 Add key to pause process list updates 2020-10-12 13:04:00 +02:00
laydervus fbf6424e64 Option to set initial filter
Closes #219
2020-10-07 10:34:25 +02:00
Daniel Lange 7758774890 Add Copyright statement to --help (needed as it has the license info) 2020-10-05 12:31:24 +02:00
Daniel Lange 079c2abf8e Update License consistently to GPLv2 as per COPYING file 2020-10-05 10:13:12 +02:00
Christian Göttsche b82a13c6ba Add clang analyzer CI job 2020-10-03 19:04:27 +02:00
Christian Göttsche 6a03cd237a Avoid warning about unreachable break statement
htop.c:112:13: warning: 'break' will never be executed [-Wunreachable-code-break]
            break;
            ^~~~~
htop.c:109:13: warning: 'break' will never be executed [-Wunreachable-code-break]
            break;
            ^~~~~
2020-09-24 20:14:17 +02:00
Christian Göttsche f4e1f4619f Add DeepCode inline suppression
We just want a non-NUll pointer in the matching pid hashtable.
The pointer is not dereferenced anyways.
2020-09-24 20:04:47 +02:00
Christian Göttsche e719a85994 Mark noreturn functions 2020-09-18 12:28:40 +02:00
Christian Göttsche c3952e7c20 Use strict function prototypes
int foo(); declares a function taking any number of arguments.
2020-09-18 12:28:40 +02:00
Christian Göttsche dd6500c7c7 Sort option in help message 2020-09-18 12:27:45 +02:00
Christian Göttsche f6b0efded5 Convert short version option to capital V
v is generally used for enabling verbose mode
2020-09-18 12:27:45 +02:00
Michael F. Schönitzer 1061bd719a Change option '-m' to '-M' for consistency of cli
`-m` was added as short option for `--no-mouse`, this is inconsistence
to the rest of the cli since otherwise the short options to disable a
feature are capital letters. Therefore this commit renames the option to
`-M`.

This commit also documents the option in the man page.
2020-09-18 12:04:21 +02:00
Christian Göttsche 71c068ad28 Free movingBar memory on exit 2020-09-17 22:04:11 +02:00
Christian Göttsche 1f5bd5c4c8 Avoid modifying optarg
It might be working, but lets rather not modify getopt's global variable
`optarg`.

Also there is no need to call `getenv("USER")`, just use `geteuid()`.
2020-09-17 21:55:26 +02:00
Nathan Scott 4597332959 Switch variable/field naming from WhiteList to MatchList 2020-09-09 19:38:15 +10:00
Nathan Scott 0750ff7e76 Fix regression in -u optional-argument handling
Resolves https://github.com/htop-dev/htop/issues/91
2020-09-04 09:50:18 +10:00
Christian Hesse db5adbeae0 add option (-U, --no-unicode) to disable unicode at runtime 2020-09-01 10:09:00 +02:00
Nathan Scott 47a7d0bd74 Merge branch 'configure' of https://github.com/cgzones/htop into cgzones-configure 2020-08-31 17:13:37 +10:00
Nathan Scott 0a835e13bf Simplify the --version output, old dates are confusing people
Drop the copyright notice from the version output as a number
of people seem to be confused by what this means, and we can
do without all the (well intentioned) bug reports.
2020-08-31 16:14:23 +10:00
Christian Göttsche 5bee902665 Drop configure option --enable-proc
Move to HTOP_LINUX, as --enable-proc implies my_htop_platform=linux, and
the Linux features do not work without a proc fs.
2020-08-28 13:10:16 +02:00
Nathan Scott cca07e9bc9 Merge branch 'hishamhm-pull-1011' 2020-08-20 15:18:20 +10:00
Nathan Scott 011125dab2 Merge branch 'hishamhm-pull-923' 2020-08-20 14:42:18 +10:00
Nathan Scott a82fd262d7 Merge branch 'hishamhm-pull-960' 2020-08-20 14:19:53 +10:00
Nathan Scott fb679dfb18 Merge branch 'hishamhm-pull-884' 2020-08-20 13:57:09 +10:00
Jorge Pereira 832e77c754
Let the user know about their error
If the user informed wrong value, then let them know about that.
2020-06-11 13:44:16 -03:00
Daniel Flanagan dd33444f7e Clean up existing whitespace 2019-10-31 11:39:12 -05:00
MartinJM b0e24cd5a5 Added an option to disable the mouse. 2019-07-12 21:41:09 +02:00
Lion Yang dc7d035238 htop.c: remove unused "--io" / "-i" (#811)
Introduced from 3383d8e556 (2.0.0) but never used.
2019-02-10 14:16:46 +01:00
solanav 7c62db73fc User option "-u" now defaults to $USER 2019-01-31 00:28:09 +01:00
Lion Yang 67e368914a htop.c: remove unused "--io" / "-i" (#811)
Introduced from 3383d8e556 (2.0.0) but never used.
2018-08-25 10:15:59 -03:00
Christian Hesse 08a9b051c5 fix option string
This broke with commit db05ba6106.
2018-05-22 23:19:19 -03:00
Daniel Flanagan db05ba6106 Add -t command-line flag for tree view 2018-04-05 19:52:19 -03:00
Hisham 565101234a Remove old commented code. 2016-02-19 13:39:38 -02:00
Hisham d4741d5410 Fix error test — looks like nobody bumped into this one! 2016-02-19 13:39:16 -02:00
Hisham b54d2dde40 Check for failure in allocations. 2016-02-02 15:53:02 +01:00
Christian Hesse 9ca646acbb align help output 2016-01-04 16:02:29 +01:00
Hisham Muhammad fbb4c49edd gcc warning cleanups. 2015-10-05 11:27:44 -03:00
Michael McConville ad1a0ad08d Replace some remaining tabs 2015-09-19 12:21:22 -04:00
Michael McConville 571cbc0aa1 Change more fprintf(stderr, ...); exit(...); to err[x](...). Tweak a few existing ones and fix some style. 2015-09-19 12:15:26 -04:00
Michael McConville a9a5a539cf (Very) initial working OpenBSD port 2015-09-18 00:46:48 -04:00