Daniel Lange
da2dcf9505
Remove duplicate test for NUL
...
Fixes #308 , thanks @qarmin (Rafał Mikrut)
2020-11-15 14:16:23 +01:00
BenBE
9e976b899b
Merge pull request #239 from StoneBam/list-locks
2020-11-14 16:03:17 +01:00
Benny Baumann
d431786fca
Split data array for file lock information into separate fields
2020-11-14 15:51:26 +01:00
Benny Baumann
18763051a2
Split platform dependent parts for file locks screen
2020-11-14 15:51:26 +01:00
Benny Baumann
2d6da2e520
Add compat wrapper for readlinkat
2020-11-09 19:17:57 +01:00
Fynn Wulf
84dad4c38e
Implement screen for active file locks
2020-11-09 19:17:57 +01:00
Christian Göttsche
0806a7958b
Assert Vector_get returns an object
...
It is generally assumed Vector_get returns a non-NULL object.
Use a generic assert in Vector_get instead of in callers.
2020-11-02 19:24:28 +01:00
Daniel Lange
742e610f1d
Merge branch 'wrap' of cgzones/htop
2020-11-02 17:08:38 +01:00
Christian Göttsche
0c1908832b
Handle data wraparounds in IO Meters
...
If the current data is smaller than the previous one, either by a retrieve error
or a device removal or a original data wraparound, sanitize the value to zero.
Fixes : #299
2020-11-02 14:46:42 +01:00
Christian Göttsche
15652e7b81
Enclose macro arguments in parentheses
2020-10-31 19:54:03 +01:00
Murloc Knight
ab17ef4dc0
Zram Meter feature
2020-10-31 18:51:53 +01:00
Christian Göttsche
43d274a617
Use integer type for item count instead of char
2020-10-31 18:36:55 +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
6787c43097
Merge branch 'source-format' of BenBE/htop
...
Closes #158
2020-10-31 17:58:30 +01:00
Benny Baumann
de884d17bb
Documentation on the repository style guide
2020-10-31 11:11:40 +01:00
Christian Göttsche
bbf01054bf
Add compat wrapper for fstatat
2020-10-29 22:21:42 +01:00
Christian Göttsche
049046c700
FreeBSD: update Process
2020-10-29 22:21:42 +01:00
Christian Göttsche
97ea45ca9a
FreeBSD: update ProcessList
2020-10-29 22:21:42 +01:00
Christian Goettsche
c2fdfd99eb
FreeBSD: implement Platform_getDiskIO()
2020-10-29 22:21:42 +01:00
Christian Göttsche
c91061c84b
FreeBSD: Platform update
2020-10-29 22:21:42 +01:00
Christian Goettsche
88eec2dc00
FreeBSD: rework tty process column
2020-10-29 22:21:42 +01:00
Christian Göttsche
ddbb0c2c35
Add HTOP_$platform defines to config.h header
...
Can be used to conditionally compile platform specific code.
2020-10-29 22:17:52 +01:00
Christian Göttsche
03b773b701
Small ListItem update
2020-10-28 20:49:11 +01:00
Christian Göttsche
6375df49c9
Simplify RichString_begin
2020-10-28 19:57:10 +01:00
Christian Göttsche
887dfde308
Implement Process_getParentPid and Process_isChildOf as functions
...
Make it more readable and fix unenclosed macro arguments
2020-10-28 19:57:10 +01:00
Christian Göttsche
76797f8d92
Implement Process_isUserlandThread as function
...
Make it more readable and fix unenclosed macro arguments
2020-10-28 19:57:10 +01:00
Christian Göttsche
d33b2be2ca
Implement LinuxProcess_effectiveIOPriority as function
...
Make it more readable and fix unenclosed macro arguments
2020-10-28 19:57:10 +01:00
Christian Göttsche
6b3dbd5c67
Implement IncSet_filter as function
...
Make it more readable and fix unenclosed macro arguments
2020-10-28 19:57:10 +01:00
Christian Göttsche
7019949574
Implement RichString_setLen as function
...
Make it more readable and fix unenclosed macro arguments
2020-10-28 19:57:10 +01:00
Christian Göttsche
8c1f5c5a6f
Enclose macro arguments in parentheses
2020-10-28 19:57:10 +01:00
Christian Göttsche
61bae4c9d2
Unify function argument names
...
Name first argument of ProcessList_goThroughEntries consistently super
Name first argument of ProcessList_new consistently userTable
2020-10-28 19:57:10 +01:00
Benny Baumann
cf1a9ec180
Refactor LinuxProcessList_readSmapsFile to work line-oriented
2020-10-28 19:46:23 +01:00
Christian Göttsche
e89b289494
Drop duplicate assignment
2020-10-27 18:00:43 +01:00
Christian Göttsche
059810ca65
Drop always true condition
2020-10-27 18:00:43 +01:00
Christian Göttsche
ac2b07eddd
Avoid some unnecessary casts and mark some not changing variables const
2020-10-27 18:00:43 +01:00
Christian Göttsche
27870bd4de
Drop unneeded variablw initialization and reduce scope
2020-10-27 18:00:43 +01:00
Christian Göttsche
1533ea88a6
Drop duplicate and always true condition
...
This block is only entered if this->owner is true.
2020-10-27 18:00:43 +01:00
Benny Baumann
c98d4577c9
Refactor code for reading process environment from procfs
2020-10-27 17:54:37 +01:00
Christian Göttsche
a3bb7cbe64
Hold only a const version of Settings in ProcessList
2020-10-26 19:30:38 +01:00
Christian Göttsche
4eb443926f
Hold only a const version of Settings in Process
2020-10-26 19:30:38 +01:00
Christian Göttsche
7109172431
Mark process parameter of Process_writeField consistently const
2020-10-26 19:30:38 +01:00
Christian Göttsche
72103e9613
Hold only a const version of the ProcessList in Meters
2020-10-26 19:30:38 +01:00
Christian Göttsche
f757810f48
Improve handling of no data in Disk and Network IO Meters
2020-10-26 19:17:14 +01:00
Jan Palus
167adc0a2b
Parse POWER_SUPPLY_CAPACITY
...
If POWER_SUPPLY_{CHARGE,ENERGY}_NOW is missing then try to use
POWER_SUPPLY_CAPACITY to determine current charge level.
2020-10-26 19:03:09 +01:00
Ross Williams
94e32cf1e8
Simplify environment-reading code
...
Suggested PR changes, thanks @cgzones
2020-10-26 19:01:11 +01:00
Ross Williams
0ae2bb1f8e
Add process environment for FreeBSD
2020-10-26 19:01:11 +01:00
Christian Göttsche
11bf7be9c2
Mark user field of Process const
...
It's a non-owning pointer to a hashtable entry.
2020-10-22 22:26:22 +02:00
Christian Göttsche
b08b255b41
Drop unused Platform functions Platform_setTasksValues
2020-10-22 22:26:12 +02:00
Daniel Lange
f8bd5acdc1
Merge branch 'Fix wrong strncmp replacement' of cgzones/htop
2020-10-20 22:41:24 +02:00
Christian Göttsche
e12d48a661
Fix wrong strncmp replacement
...
Fixes 4c66eb6d4c
2020-10-20 22:30:13 +02:00