1. 29 Dec, 2016 1 commit
    • Tomasz Kramkowski's avatar
      Replace all uses of sprintf with snprintf · 2b5c1b4b
      Tomasz Kramkowski authored
      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.
      2b5c1b4b
  2. 04 May, 2016 1 commit
    • Explorer09's avatar
      Rename Meter.setValues() functions to updateValues() · 9dea20e0
      Explorer09 authored
      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.
      9dea20e0
  3. 11 Mar, 2016 1 commit
    • Explorer09's avatar
      Explicit "maxItems" property of meters · 99fb3070
      Explorer09 authored
      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.
      99fb3070
  4. 27 Nov, 2014 3 commits
  5. 16 Jan, 2014 1 commit
  6. 05 Dec, 2012 1 commit
  7. 26 Dec, 2011 2 commits
  8. 25 Oct, 2011 1 commit
  9. 08 Sep, 2011 1 commit
  10. 26 May, 2011 1 commit
  11. 25 Feb, 2010 1 commit
  12. 16 Oct, 2009 1 commit
  13. 11 Mar, 2009 1 commit
  14. 09 Mar, 2008 1 commit
  15. 30 Aug, 2006 1 commit
  16. 06 Jun, 2006 1 commit
  17. 10 Apr, 2006 1 commit
  18. 04 Mar, 2006 1 commit