summaryrefslogtreecommitdiffstats
path: root/BatteryMeter.c
AgeCommit message (Collapse)Author
2020-12-19Enable -Wformat=2Christian Göttsche
Now that the global format variable Process_pidFormat is gone, enable the compiler warning -Wformat=2.
2020-12-06Use size_t as len type for Meter_UpdateValuesChristian Göttsche
Most of the time the parameter is passed to snprintf type functions
2020-11-26Make casing of N/A consistent (majority was N/A)Benny Baumann
2020-11-18Merge individual Battery.[ch] files into Platform.[ch]Nathan Scott
Small changes from review - keep headers sorted and keep local variable declarations at the top of source files.
2020-11-18Merge individual Battery.[ch] files into Platform.[ch]Nathan Scott
Consistent with everything else involving platform-specific calls from core htop code.
2020-11-02Spacing around operatorsBenny Baumann
2020-10-18Make all required includes explicitBenny Baumann
Information as seen by IWYU 0.12 + clang 9 on Linux
2020-10-16Rename StringUtils.[ch] to XUtils.[ch]Benny Baumann
2020-10-07Mark Object instances constChristian Göttsche
2020-10-05Update License consistently to GPLv2 as per COPYING fileDaniel Lange
2020-09-29Drop redundant return statementsChristian Göttsche
2020-09-29Covert Meter attributes to file-local constant arraysChristian Göttsche
2020-09-24Update battery API to use NAN on errorBenny Baumann
2020-09-03Axe automated header generation.Zev Weiss
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.
2019-10-31Clean up existing whitespaceDaniel Flanagan
2017-07-27Security review: check results of snprintf.Hisham Muhammad
Calls marked with xSnprintf shouldn't fail. Abort program cleanly if any of them does.
2016-05-04Rename Meter.setValues() functions to updateValues()Explorer09
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.
2016-03-11Explicit "maxItems" property of metersExplorer09
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.
2015-08-19Rename String to StringUtils.David Hunt
Fixes building on case-insensitive filesystems where String.h gets confused with <string.h>. From d734dacea0a10d0465dad4e95b3421511e7da112 Mon Sep 17 00:00:00 2001 From: David Hunt <dhunt@iolanthe.attlocal.net> Date: Sat, 11 Jul 2015 20:56:31 -0500 Subject: [PATCH 1/8] Rename String to StringUtils
2015-03-16Merge branch 'master' into wipHisham Muhammad
Conflicts: Process.c Process.h linux/LinuxProcess.c linux/LinuxProcess.h linux/LinuxProcessList.c unsupported/Platform.c unsupported/Platform.h
2015-02-23Fix allocation of processes. Closes #166.Hisham Muhammad
Conflicts: Process.c Process.h ProcessList.c ScreenManager.c linux/LinuxProcessList.c
2015-01-23Another mega-patch for the refactoring process.Hisham Muhammad
Kinda runs, but functionality from the original main loop is still missing. Patience.
2014-11-27Move platform-dependent parts of Linux battery meter.Hisham Muhammad
2014-04-24More sanity checks.Hisham Muhammad
2014-04-24Make static analyzers happy.Hisham Muhammad
2014-04-24Oops, fix use of memset.Hisham Muhammad
2014-04-24Fix array limit.Hisham Muhammad
2014-04-24Remove useless test.Hisham Muhammad
2014-04-22Refactor and fix resource leaks.Hisham Muhammad
2014-01-16BUGFIX: Fix crash when adding meters and toggling detailed CPU time.Hisham Muhammad
See https://bugzilla.redhat.com/show_bug.cgi?id=987805 for details. (thanks to Dawid Gajownik for the detailed analysis!)
2012-12-05Changes in object model: separate class objects to store vtable. Also, nicer ↵Hisham Muhammad
UTF-8 display of big numbers.
2012-02-02minor style cleanupsHisham Muhammad
2011-12-26Remove old memory debugging routines. We have Valgrind nowadays.Hisham Muhammad
2011-12-26major header cleanupHisham Muhammad
2011-10-25cleanups and fixes, thanks to cppcheck and gcc -WextraHisham Muhammad
2011-05-26Tempus fugit.Hisham Muhammad
2010-11-20Improve battery meter support (thanks to Richard W.) Closes #3063541.Hisham Muhammad
2010-02-25Tempus fugit.Hisham Muhammad
2010-02-25warning fixesHisham Muhammad
2010-02-22minor tweaks by David WeberHisham Muhammad
2009-06-02don't use unbounded operationsHisham Muhammad
2009-04-27updated battery meter code from Ian Hands, slightly tweakedHisham Muhammad
2008-09-23ACPI Battery meterHisham Muhammad
contributed by Ian Hands