summaryrefslogtreecommitdiffstats
path: root/UptimeMeter.c
Commit message (Collapse)AuthorAgeFilesLines
* Add includes for config.h as per the discussion in PR #1337Daniel Lange2023-12-261-0/+2
| | | | | | Many thanks to @Explorer09 Kang-Che Sung (宋岡哲). Also add a #error stanza to XUtils.h in case somebody forgets the beautiful mess GNU forces on us.
* Update license headers to explicitly say GPLv2+Daniel Lange2021-09-221-1/+1
|
* UptimeMeter: treat all non-positive values as errorChristian Göttsche2021-07-181-1/+1
| | | | | Bogus uptime measurements can result in wrap-arounds, leading to negative garbage values printed.
* Save text buffer in MeterChristian Göttsche2021-03-041-3/+3
|
* Use size_t as len type for Meter_UpdateValuesChristian Göttsche2020-12-061-1/+1
| | | | Most of the time the parameter is passed to snprintf type functions
* Spacing around operatorsBenny Baumann2020-11-021-3/+3
|
* Make all required includes explicitBenny Baumann2020-10-181-0/+1
| | | | Information as seen by IWYU 0.12 + clang 9 on Linux
* Rename StringUtils.[ch] to XUtils.[ch]Benny Baumann2020-10-161-1/+1
|
* Move xAsprintf, xSnprintf and xStrdup to StringUtils.hBenny Baumann2020-10-161-1/+3
|
* Mark Object instances constChristian Göttsche2020-10-071-1/+1
|
* Update License consistently to GPLv2 as per COPYING fileDaniel Lange2020-10-051-1/+1
|
* Covert Meter attributes to file-local constant arraysChristian Göttsche2020-09-291-1/+1
|
* Axe automated header generation.Zev Weiss2020-09-031-3/+0
| | | | | | | | | | | | | | Reasoning: - implementation was unsound -- broke down when I added a fairly basic macro definition expanding to a struct initializer in a *.c file. - made it way too easy (e.g. via otherwise totally innocuous git commands) to end up with timestamps such that it always ran MakeHeader.py but never used its output, leading to overbuild noise when running what should be a null 'make'. - but mostly: it's just an awkward way of dealing with C code.
* 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-3/+3
| | | | | | | | | | | | 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-2/+2
| | | | | | | | | | | | 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.
* Make UptimeMeter cross-platform again.Hisham Muhammad2014-11-271-10/+5
|
* Move UptimeMeter back into cross-platform code.Hisham Muhammad2014-11-271-0/+64
| | | | We'll just isolate the platform-dependent bit.
* Move UptimeMeter into platform-dependent area.Hisham Muhammad2014-11-271-64/+0
| | | | Set up environment to move other meters.
* BUGFIX: Fix crash when adding meters and toggling detailed CPU time.Hisham Muhammad2014-01-161-1/+0
| | | | | See https://bugzilla.redhat.com/show_bug.cgi?id=987805 for details. (thanks to Dawid Gajownik for the detailed analysis!)
* Changes in object model: separate class objects to store vtable. Also, nicer ↵Hisham Muhammad2012-12-051-3/+6
| | | | 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-4/+7
|
* cleanups and fixes, thanks to cppcheck and gcc -WextraHisham Muhammad2011-10-251-1/+1
|
* sanity checksHisham Muhammad2011-09-081-2/+4
|
* Tempus fugit.Hisham Muhammad2011-05-261-1/+1
|
* Tempus fugit.Hisham Muhammad2010-02-251-1/+1
|
* coverity fixesHisham Muhammad2009-10-161-1/+1
|
* simplify uptime calculationHisham Muhammad2009-03-111-3/+3
|
* Clean up headers by using 'static' whenever possible.Hisham Muhammad2008-03-091-13/+13
| | | | | Reduces resulting code size.
* A fix for long uptimes, sent my Marc CahalanHisham Muhammad2006-08-301-1/+1
|
* Updates for new version of the MakeHeader.py script.Hisham Muhammad2006-06-061-3/+3
|
* - Overhaul meters implementation;Hisham Muhammad2006-04-101-51/+32
| | | | | | - add AllCPUsMeter; - because of that, the new .htoprc is incompatible with previous released versions.
* Initial import.Hisham Muhammad2006-03-041-0/+77

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