summaryrefslogtreecommitdiffstats
path: root/LoadAverageMeter.c
Commit message (Collapse)AuthorAgeFilesLines
* Security review: check results of snprintf.Hisham Muhammad2017-07-271-6/+6
| | | | | Calls marked with xSnprintf shouldn't fail. Abort program cleanly if any of them does.
* Replace all uses of sprintf with snprintfTomasz Kramkowski2016-12-291-4/+4
| | | | | | | | | | | | In all the cases where sprintf was being used within htop, snprintf could have been used. This patch replaces all uses of sprintf with snprintf which makes sure that if a buffer is too small to hold the resulting string, the string is simply cut short instead of causing a buffer overflow which leads to undefined behaviour. `sizeof(variable)` was used in these cases, as opposed to `sizeof variable` which is my personal preference because `sizeof(variable)` was already used in one way or another in other parts of the code.
* Rename Meter.setValues() functions to updateValues()Explorer092016-05-041-4/+4
| | | | | | | | | | | | Rationale (copied from htop issue #471): The function name "setValues" is misleading. For most OOP (object- oriented programming) contexts, setXXX functions mean they will change some member variables of an object into something specified in function arguments. But in the *Meter_setValues() case, the new values are not from the arguments, but from a hard-coded source. The caller is not supposed to change the values[] to anything it likes, but rather to "update" the values from the source. Hence, updateValues is a better name for this family of functions.
* Explicit "maxItems" property of metersExplorer092016-03-111-0/+1
| | | | | | | | | Two changes in this commit: - All meters now explicitly specify "maxItems" property, even for just 1 item. (Exception is "container" CPU meter classes, which use CUSTOM_METERMODE.) - "maxItems" being 0 is now allowed. This will let bar meters and graph meters render an empty meter.
* Array entries have been oddly flipped here for years.Hisham Muhammad2015-11-231-7/+7
|
* match load averages desc. to what it actually showskaefer2015-11-041-1/+1
|
* Add longer descriptions to available meters.Hisham Muhammad2015-02-031-0/+2
|
* Isolate cross-platform code for load average.Hisham Muhammad2014-11-271-17/+3
|
* BUGFIX: Fix crash when adding meters and toggling detailed CPU time.Hisham Muhammad2014-01-161-2/+1
| | | | | See https://bugzilla.redhat.com/show_bug.cgi?id=987805 for details. (thanks to Dawid Gajownik for the detailed analysis!)
* Remove explicit calls to curses.h in other filesHisham Muhammad2013-02-261-1/+0
|
* Changes in object model: separate class objects to store vtable. Also, nicer ↵Hisham Muhammad2012-12-051-6/+14
| | | | UTF-8 display of big numbers.
* Remove old memory debugging routines. We have Valgrind nowadays.Hisham Muhammad2011-12-261-1/+0
|
* major header cleanupHisham Muhammad2011-12-261-3/+8
|
* cleanups and fixes, thanks to cppcheck and gcc -WextraHisham Muhammad2011-10-251-1/+1
|
* sanity checksHisham Muhammad2011-09-081-5/+8
|
* Tempus fugit.Hisham Muhammad2011-05-261-1/+1
|
* Remove arbitrary limit from rich stringsHisham Muhammad2010-11-221-4/+2
| | | | | | | | | Fix subtree hiding Fix reading of CPU values in hidden threads Fix hiding of zombie processes as kernel threads Remove "debug proc" code Code cleanup in processElements
* Tempus fugit.Hisham Muhammad2010-02-251-1/+1
|
* warning fixesHisham Muhammad2010-02-251-3/+3
|
* Clean up headers by using 'static' whenever possible.Hisham Muhammad2008-03-091-28/+28
| | | | | Reduces resulting code size.
* Perform RichString operations by hand.Hisham Muhammad2006-07-121-2/+2
| | | | | Avoid unnecessary operations when processing entries on ProcessList.
* Updates for new version of the MakeHeader.py script.Hisham Muhammad2006-06-061-7/+4
|
* - Overhaul meters implementation;Hisham Muhammad2006-04-101-30/+49
| | | | | | - add AllCPUsMeter; - because of that, the new .htoprc is incompatible with previous released versions.
* Initial import.Hisham Muhammad2006-03-041-0/+71

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