1. 31 Jan, 2017 1 commit
  2. 30 Dec, 2016 1 commit
  3. 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
  4. 01 Oct, 2016 1 commit
  5. 16 Sep, 2016 4 commits
  6. 14 Sep, 2016 1 commit
    • Explorer09's avatar
      Real-time signals support (for kill command) · 0ce4835f
      Explorer09 authored
      SignalsPanel_new now fetches SIGRTMIN and SIGRTMAX and generates real-
      time signals entries at runtime.
      
      All signals between SIGRTMIN and SIGRTMAX are written in "SIGRTMIN+n"
      notation, per discussion in pull request #551.
      
      Signed-off-by: Kang-Che Sung <explorer09 @ gmail.com>
      0ce4835f
  7. 12 Sep, 2016 2 commits
  8. 06 Sep, 2016 2 commits
  9. 30 Aug, 2016 4 commits
  10. 24 Aug, 2016 2 commits
  11. 23 Aug, 2016 1 commit
  12. 11 Aug, 2016 2 commits
    • Hisham Muhammad's avatar
      Merge pull request #537 from Explorer09/string-utils · d3f57526
      Hisham Muhammad authored
      Optimize Strings_startWith()
      d3f57526
    • Explorer09's avatar
      Optimize Strings_startWith() · bf35921a
      Explorer09 authored
      Use strncmp() combined with a strlen() will give better performance
      than a strstr in worst case. Especially when the match prefix is a
      constant and not a variable.
      
      While we are at it, replace the match() function in linux/Battery.c,
      which uses a naive algorithm, with a macro that does better job by
      utilizing Strings_startWith().
      
          $ gcc --version | head -n 1
          gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
          $ uname -m
          x86_64
          $ size htop.old htop.new
             text   data    bss    dec    hex filename
           137929  15112   3776 156817  26491 htop.old
           137784  15104   3776 156664  263f8 htop.new
      
      Signed-off-by: Kang-Che Sung <explorer09 @ gmail.com>
      bf35921a
  13. 09 Aug, 2016 1 commit
  14. 06 Aug, 2016 1 commit
    • Explorer09's avatar
      Fix scrolling behavior change caused by 759caf0f · 3d986883
      Explorer09 authored
      Commit "Make PgDown behavior more usual." 759caf0f
      silently changes the PageDown scrolling behavior that, instead of
      scrolling one window down until the end of the window touches the end
      of the list, the window simply repositions itself in a way that the
      selected item always become the last item in the new window.
      
      The commit reverts the behavior, and also fixes sanity conditionals
      so that the scrollV variable will _never_ become negative or out-of-
      bound.
      
      Fixes issue #532. Also keep the problem #480 addressed.
      
      Signed-off-by: Kang-Che Sung <explorer09 @ gmail.com>
      3d986883
  15. 28 Jul, 2016 2 commits
  16. 23 Jul, 2016 1 commit
  17. 22 Jul, 2016 1 commit
  18. 21 Jul, 2016 2 commits
  19. 12 Jul, 2016 1 commit
  20. 11 Jul, 2016 1 commit
  21. 23 Jun, 2016 1 commit
  22. 20 Jun, 2016 1 commit
  23. 19 Jun, 2016 3 commits
  24. 18 Jun, 2016 1 commit
  25. 17 Jun, 2016 2 commits