summaryrefslogtreecommitdiffstats
path: root/Header.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused function Header_readMeterNameChristian Göttsche2020-12-061-15/+0
|
* Update even more snprintfsChristian Göttsche2020-11-281-3/+3
| | | | Use size of actual buffers instead of magic numbers
* Embracing branchesBenny Baumann2020-11-021-2/+7
|
* Spacing around operatorsBenny Baumann2020-11-021-1/+1
|
* Make all required includes explicitBenny Baumann2020-10-181-4/+8
| | | | Information as seen by IWYU 0.12 + clang 9 on Linux
* Rename StringUtils.[ch] to XUtils.[ch]Benny Baumann2020-10-161-1/+1
|
* Mark Object instances constChristian Göttsche2020-10-071-2/+2
|
* Update License consistently to GPLv2 as per COPYING fileDaniel Lange2020-10-051-1/+1
|
* Clean up some code duplication in the header filesHugo Musso Gualandi2020-09-121-2/+0
| | | | | | | | | | | | | PR htop-dev/htop#70 got rid of the infrastructure for generating header files, but it left behind some code duplication. Some of cases are things that belong in the header file and don't need to be repeated in the C file. Other cases are things that belong in the C file and don't need to be in the header file. In this commit I tried to fix all of these that I could find. When given a choice I preferred keeping things out of the header file, unless they were being used by someone else.
* Consolidate repeated macro definitions into one headerNathan Scott2020-09-091-8/+1
| | | | | | | | The MIN, MAX, CLAMP, MINIMUM, and MAXIMUM macros appear throughout the codebase with many re-definitions. Make a single copy of each in a common header file, and use the BSD variants of MINIMUM/MAXIMUM due to conflicts in the system <sys/param.h> headers.
* Axe automated header generation.Zev Weiss2020-09-031-15/+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.
* Avoid string overflow warningChristian Göttsche2020-08-251-1/+1
| | | | | | | | | | | | Enough memory is allocated. Header.c: In function ‘Header_readMeterName’: Header.c:157:4: error: ‘strncpy’ specified bound depends on the length of the source argument [-Werror=stringop-overflow=] 157 | strncpy(name, Meter_name(meter), nameLen); | ^ Header.c:154:18: note: length computed here 154 | int nameLen = strlen(Meter_name(meter)); | ^
* Merge branch 'hishamhm-pull-960'Nathan Scott2020-08-201-5/+5
|\
| * Clean up existing whitespaceDaniel Flanagan2019-10-311-5/+5
| |
* | Restore meter name after used in Header_addMeterByName()wangqr2019-02-121-0/+2
|/ | | | Fix #852
* Security review: check results of snprintf.Hisham Muhammad2017-07-271-3/+3
| | | | | Calls marked with xSnprintf shouldn't fail. Abort program cleanly if any of them does.
* Fix macro Header_forEachColumnExplorer092016-05-071-1/+1
| | | | | | | The (this_) token was not expanded properly, but the bug was not caught because all uses of this macro specifies (this_)=this . Also parenthesize macro tokens to prevent further problems.
* Check for failure in allocations.Hisham2016-02-021-6/+6
|
* fix calloc() callsChristian Hesse2015-09-071-1/+1
| | | | | | | * size_t nmemb (number of elements) first, then size_t size * do not assume char is size 1 but use sizeof() * allocate for char, not pointer to char (found by Michael McConville, fixes #261)
* Rename String to StringUtils.David Hunt2015-08-191-1/+1
| | | | | | | | | 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
* write header length (number of columns) back to configurationChristian Hesse2015-06-121-0/+1
|
* Fix saving of header states, motion in Setup screen.Hisham Muhammad2015-03-161-1/+30
|
* Another mega-patch for the refactoring process.Hisham Muhammad2015-01-231-7/+20
| | | | | Kinda runs, but functionality from the original main loop is still missing. Patience.
* Sorry about the mega-patch.Hisham Muhammad2015-01-211-71/+64
| | | | | This is a work-in-progress, code is currently broken. (Some actions, and notably, the header, are missing.)
* Move UptimeMeter into platform-dependent area.Hisham Muhammad2014-11-271-1/+2
| | | | Set up environment to move other meters.
* Decouple Header from Meter classes.Hisham Muhammad2014-11-271-26/+0
| | | | (Yes, that's dynamic typing!)
* Restrict size of read.Hisham Muhammad2014-04-211-1/+1
|
* alignment improvementsHisham Muhammad2014-02-271-1/+1
|
* Fix order of calloc arguments.Hisham Muhammad2014-01-161-1/+1
| | | | (Patch by Dawid Gajownik)
* Changes in object model: separate class objects to store vtable. Also, nicer ↵Hisham Muhammad2012-12-051-21/+20
| | | | 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-1/+16
|
* Mega-commit with features and tweaks for 1.0:Hisham Muhammad2011-11-181-2/+10
| | | | | | | | | | | * Performance improvements * Support for splitting CPU meters into two or four columns (thanks to Wim Heirman) * Switch from PLPA, which is now deprecated, to HWLOC. * Bring back support for native Linux sched_setaffinity, so we don't have to use HWLOC where we don't need to. * Support for typing in user names and column fields in selection panels.
* Tempus fugit.Hisham Muhammad2011-05-261-1/+1
|
* only reinit initializable metersHisham Muhammad2011-03-291-2/+4
|
* * Option for counting CPUs from zeroHisham Muhammad2011-03-221-2/+14
| | | | | | (thanks to Sean Noonan) * Meters update in every screen (no longer halting while on Setup, etc.)
* Tempus fugit.Hisham Muhammad2010-02-251-1/+1
|
* Avoid crashing when using many meters (thanks to David Cho for the report)Hisham Muhammad2007-11-261-0/+2
|
* Performance improvement hackathon: improve process comparison routines,Hisham Muhammad2006-07-111-2/+2
| | | | | | | | | | disable useless code in release builds such as runtime type-checking on dynamic data structures and process fields that are not being computed, faster(?) method for verifying the process owner (still need to ensure correctness), don't destroy and create process objects for hidden kernel threads over and over. Phew. I shouldn't be doing all this today, but I could not resist.
* Rename TypedVector to Vector, matching dit.Hisham Muhammad2006-05-301-32/+32
|
* Final fixes to make "All CPUs" the default CPU display mode.Hisham Muhammad2006-05-091-2/+1
|
* - Overhaul meters implementation;Hisham Muhammad2006-04-101-43/+36
| | | | | | - add AllCPUsMeter; - because of that, the new .htoprc is incompatible with previous released versions.
* Update copyrights.Hisham Muhammad2006-03-231-1/+1
|
* Initial import.Hisham Muhammad2006-03-041-0/+177

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