summaryrefslogtreecommitdiffstats
path: root/freebsd
Commit message (Collapse)AuthorAgeFilesLines
* Linux: use correct column alignment for wide fieldsChristian Göttsche2021-01-112-9/+4
| | | | | | | This affects: - PROC_COMM, PROC_EXE and CWD on Linux - JAIL on FreeBSD and DragonFlyBSD - ZONE on Solaris
* Drop usage of formatted error messages from <err.h>Christian Göttsche2021-01-071-2/+1
| | | | | | | They do not clean up the ncurses environment, leaving the terminal in a broken state. Also drop bare usage of exit(3).
* Object: return int on comparisonChristian Göttsche2021-01-021-1/+1
| | | | | Comparisons do, due to the new introduced shaceship-comparisons, only return -1, 0, 1 or the result of strcmp().
* Mark Platform_defaultFields constChristian Göttsche2020-12-192-2/+2
|
* Merge Process_pidColumns into Process_fields and rework auto-fit for ↵Christian Göttsche2020-12-192-23/+10
| | | | PID-like columns
* Rework enum ProcessFieldChristian Göttsche2020-12-195-18/+21
| | | | | | Use only one enum instead of a global and a platform specific one. Drop Platform_numberOfFields global variable. Set known size of Process_fields array
* Split boilerplate and platform-independent field comparisonBenny Baumann2020-12-191-1/+1
| | | | | | | | This acheives two things: - Allows for simple tie-breaking if values compare equal (needed to make sorting the tree-view stable) - Allows for platform-dependent overriding of the sort-order for specific fields Also fixes a small oversight on DragonFlyBSD when default-sorting.
* Invert Process_compare resolution so that superclass matches run firstHisham Muhammad2020-12-191-14/+7
| | | | | | | | | | * This removes duplicated code that adjusts the sort direction from every OS-specific folder. * Most fields in a regular htop screen are OS-independent, so trying Process_compare first and only falling back to the OS-specific compareByKey function if it's an OS-specific field makes sense. * This will allow us to override the sortKey in a global way without having to edit each OS-specific file.
* Drop redundant sys/dirent.h includeGraham Inggs2020-12-111-1/+0
| | | sys/dirent.h is included by dirent.h in FreeBSD, and does not exist in Debian GNU/kFreeBSD
* Cull the definitions of pageSize and pageSizeKB from CRT.cNathan Scott2020-12-101-9/+6
| | | | | | | | | | | | | | | By storing the per-process m_resident and m_virt values in the form htop wants to display them in (KB, not pages), we no longer need to have definitions of pageSize and pageSizeKB in the common CRT code. These variables were never really CRT (i.e. display) related in the first place. It turns out the darwin platform code doesn't need to use these at all (the process values are extracted from the kernel in bytes not pages) and the other platforms can each use their own local pagesize variables, in more appropriate locations. Some platforms were actually already doing this, so this change is removing duplication of logic and variables there.
* Split RichString_(append|appendn|write) into wide and asciiChristian Göttsche2020-12-081-1/+1
| | | | | | | | RichString_writeFrom takes a top spot during performance analysis due to the calls to mbstowcs() and iswprint(). Most of the time we know in advance that we are only going to print regular ASCII characters.
* FreeBSD: fix crash on empty environmentChristian Goettsche2020-12-051-1/+1
| | | | e.g. on kernel threads
* Drop unused global ProcessList memory fieldsNathan Scott2020-11-271-8/+0
| | | | | | | | | | The global ProcessList structure contains a couple of unused fields. 'sharedMem' has never been used by any Meter, since its not been anything other than zero in Linux /proc/meminfo for many, many years. The freeMem field is only used in the usedMem calculation, so it can reside on the stack like some other memory variables used within-calculations-only and not exposed to the user via a Meter.
* Unify naming of first argument of Platform_getBatteryChristian Göttsche2020-11-252-4/+4
| | | | Use percent throughout
* Merge branch 'cleanup-init-done' into masterNathan Scott2020-11-232-6/+19
|\
| * Consistent ordering of function declarations for FreeBSDNathan Scott2020-11-231-2/+2
| |
| * Minor cleanups to platform-specific init and doneNathan Scott2020-11-192-5/+18
| | | | | | | | | | | | | | Move platform-specific code out of the htop.c main function and into the platform sub-directories - primarily this is the Linux procfs path check and sensors setup/teardown; not needed on any other platforms. No functional changes here.
* | Simplify code flow by inlining declarations where they are usedBenny Baumann2020-11-221-14/+7
| | | | | | | | Note that xStrdup always returns non-NULL, thus the one error case cannot be reached.
* | No need to check for change when no action is requiredBenny Baumann2020-11-221-4/+2
| |
* | Simplify page size related calculationsChristian Göttsche2020-11-211-1/+1
| |
* | Rename virtual memory column from M_SIZE to M_VIRTChristian Göttsche2020-11-213-3/+3
| | | | | | | | Closes: #325
* | IWYU update (FreeBSD)Christian Goettsche2020-11-196-19/+33
|/
* Merge individual Battery.[ch] files into Platform.[ch]Nathan Scott2020-11-184-43/+18
| | | | | Consistent with everything else involving platform-specific calls from core htop code.
* Merge branch 'temperature_v2' of cgzones/htopDaniel Lange2020-11-171-0/+1
|\ | | | | | | | | Closes #111, closes #49 Closes #93 - thank you for leading the way @DX37 (Maxim Kurnosenko)!
| * Show CPU temperature in CPU meterChristian Göttsche2020-11-161-0/+1
| | | | | | | | | | Show the CPU temperature in the CPU meter, like CPU frequency, instead of using an extra Meter.
* | Add process column for normalized CPU usageChristian Göttsche2020-11-161-0/+1
|/ | | | Shows the process CPU usage divided by the number of CPU cores
* Introduce spaceship comparison for ProcessesChristian Göttsche2020-11-151-3/+5
| | | | | | | | | | | | | | | If currently two unsigned values are compared via `a - b`, in the case b is actually bigger than a, the result will not be an negative number (as -1 is expected) but a huge positive number as the subtraction is an unsigned subtraction. Avoid over-/underflow affected operations; use comparisons. Modern compilers will generate sane code, like: xor eax, eax cmp rdi, rsi seta al sbb eax, 0 ret
* Resolve merge conflicts, merge #298 "Macro cleanup" from @BenBEDaniel Lange2020-11-156-70/+85
|\
| * Embracing branchesBenny Baumann2020-11-023-18/+33
| |
| * Spacing around operatorsBenny Baumann2020-11-025-26/+26
| |
| * Whitespace and indentation issuesBenny Baumann2020-11-022-24/+24
| |
| * Spacing after keywords (if)Benny Baumann2020-11-021-2/+2
| |
* | Split platform dependent parts for file locks screenBenny Baumann2020-11-142-0/+19
|/
* Add compat wrapper for fstatatChristian Göttsche2020-10-291-2/+3
|
* FreeBSD: update ProcessChristian Göttsche2020-10-293-22/+21
|
* FreeBSD: update ProcessListChristian Göttsche2020-10-292-12/+8
|
* FreeBSD: implement Platform_getDiskIO()Christian Goettsche2020-10-292-9/+43
|
* FreeBSD: Platform updateChristian Göttsche2020-10-291-21/+20
|
* FreeBSD: rework tty process columnChristian Goettsche2020-10-294-2/+100
|
* Unify function argument namesChristian Göttsche2020-10-282-14/+14
| | | | | Name first argument of ProcessList_goThroughEntries consistently super Name first argument of ProcessList_new consistently userTable
* Drop duplicate assignmentChristian Göttsche2020-10-271-1/+0
|
* Hold only a const version of Settings in ProcessListChristian Göttsche2020-10-261-1/+1
|
* Hold only a const version of Settings in ProcessChristian Göttsche2020-10-263-4/+4
|
* Mark process parameter of Process_writeField consistently constChristian Göttsche2020-10-262-4/+4
|
* Hold only a const version of the ProcessList in MetersChristian Göttsche2020-10-261-6/+6
|
* Improve handling of no data in Disk and Network IO MetersChristian Göttsche2020-10-262-11/+13
|
* Simplify environment-reading codeRoss Williams2020-10-261-8/+2
| | | | Suggested PR changes, thanks @cgzones
* Add process environment for FreeBSDRoss Williams2020-10-261-3/+25
|
* Drop unused Platform functions Platform_setTasksValuesChristian Göttsche2020-10-222-7/+0
|
* Drop tabs in source indentionsChristian Göttsche2020-10-201-1/+1
|

© 2014-2024 Faster IT GmbH | imprint | privacy policy