Commit Graph

35 Commits

Author SHA1 Message Date
Daniel Lange 94ad111391 Update license headers to explicitly say GPLv2+ 2021-09-22 14:28:19 +02:00
Christian Göttsche 68c00b9cdb Header: cache number of columns in HeaderLayout_getColumns
The header layout, and therefore the number of columns, should never
be changed within such loop.
2021-09-12 18:35:24 +02:00
Christian Göttsche 2bf626c4e4 IWYU update 2021-08-25 09:54:30 +02:00
Christian Göttsche 9060a4179d Add option to change Header layout 2021-08-22 16:15:59 +02:00
Nathan Scott a476490282 Ensure we do not attempt to add a DynamicMeter via the
htoprc that we didn't find during start up.  This just
leaves blank sections of the display as @smalinux found.

Related to https://github.com/htop-dev/htop/pull/682
2021-07-14 11:58:31 +10:00
mayurdahibhate 3f86a011e6 platform-dependent files included relative to main source directory 2021-05-10 18:40:53 +02:00
Christian Göttsche a11d01568c Use unsigned types for CPU counts and associated variables 2021-03-19 23:30:54 +01:00
Christian Göttsche b862e36ee7 Separate data-update and drawing of header 2021-03-04 23:57:45 +01:00
Christian Göttsche d72b0a682e Mark several non-modified pointer variables const 2021-01-11 20:12:34 +01:00
Christian Göttsche 3d15ba5197 Remove unused function Header_readMeterName 2020-12-06 16:03:25 +01:00
Nathan Scott fee217551c Drop unneeded parameters to the ScreenManager constructor
All calls to ScreenManager_new always pass the same first
five values, the orientation is always HORIZONTAL and the
y1 parameter is always the height of the passed-in header
struct pointer.  I think its safe to assert at this point
that no VERTICAL orientation will arrive (if it does, its
no harm in re-adding this then) - so we can remove unused
conditionals (and TODOs) based on orientation too.
2020-11-26 23:55:53 +01:00
Benny Baumann 0f5262917f Make all required includes explicit
Information as seen by IWYU 0.12 + clang 9 on Linux
2020-10-18 20:09:05 +02:00
Christian Göttsche ba282cfe19 Mark Object instances const 2020-10-07 13:01:53 +02:00
Daniel Lange 079c2abf8e Update License consistently to GPLv2 as per COPYING file 2020-10-05 10:13:12 +02:00
Nathan Scott c5808c56db Consolidate repeated macro definitions into one header
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.
2020-09-09 16:56:04 +10:00
Nathan Scott 8ec5d4a3a0 Further, minor cleanups to headers post-MakeHeaders
Remove leftover empty ifdef/endif pairs, whitespace.
The generated htop.h file was also unused - removed.
2020-09-08 17:33:50 +10:00
Zev Weiss 7b7822b896 Remove superfluous 'extern's from function declarations.
Applied via:

  $ find * -name '*.h' -exec sed -i -r 's/^extern (.+\()/\1/;' {} +

Suggested-by: Bert Wesarg <bert.wesarg@googlemail.com>
2020-09-03 11:59:26 -05:00
Zev Weiss a1a027b9bd Axe automated header generation.
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.
2020-09-03 11:58:58 -05:00
Nathan Scott 7ac1c709b7 Re-generate all headers with latest scripts/MakeHeader.py
Sync-up missing extern declarations for many functions.
2020-08-18 17:41:49 +10:00
Explorer09 54621e8b8f Fix macro Header_forEachColumn
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.
2016-05-07 14:57:51 +08:00
Hisham Muhammad 9ff5d2b243 Fix saving of header states, motion in Setup screen. 2015-03-16 23:01:21 -03:00
Hisham Muhammad c2108e5a48 Another mega-patch for the refactoring process.
Kinda runs, but functionality from the original main loop
is still missing. Patience.
2015-01-23 03:08:21 -02:00
Hisham Muhammad 3383d8e556 Sorry about the mega-patch.
This is a work-in-progress, code is currently broken.
(Some actions, and notably, the header, are missing.)
2015-01-21 23:27:31 -02:00
Hisham Muhammad b192af006f Decouple Header from Meter classes.
(Yes, that's dynamic typing!)
2014-11-27 18:38:52 -02:00
Hisham Muhammad 6d90e58c01 alignment improvements 2014-02-27 16:35:22 -03:00
Hisham Muhammad 00b324bfc1 Changes in object model: separate class objects to store vtable. Also, nicer UTF-8 display of big numbers. 2012-12-05 15:12:20 +00:00
Hisham Muhammad 84281bdc44 major header cleanup 2011-12-26 21:35:57 +00:00
Hisham Muhammad 7ca1081712 Mega-commit with features and tweaks for 1.0:
* 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.
2011-11-18 06:08:56 +00:00
Hisham Muhammad 300caa076e Tempus fugit. 2011-05-26 16:35:07 +00:00
Hisham Muhammad a9c0ea3753 * Option for counting CPUs from zero
(thanks to Sean Noonan)
* Meters update in every screen (no longer halting while on Setup, etc.)
2011-03-22 20:37:08 +00:00
Hisham Muhammad a600d5a6e9 Tempus fugit. 2010-02-25 02:08:18 +00:00
Hisham Muhammad f6e0b7d0c0 Regenerated all headers. 2006-06-06 20:28:42 +00:00
Hisham Muhammad a853faaa2d Rename TypedVector to Vector, matching dit. 2006-05-30 13:45:40 +00:00
Hisham Muhammad 33113fe0d7 - Overhaul meters implementation;
- add AllCPUsMeter;
- because of that, the new .htoprc is incompatible with previous released versions.
2006-04-10 20:40:38 +00:00
Hisham Muhammad d6231bab89 Initial import. 2006-03-04 18:16:49 +00:00