aboutsummaryrefslogtreecommitdiffstats
path: root/Process.c
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2016-04-11 13:00:20 +0200
committerDaniel Lange <DLange@git.local>2016-04-11 13:00:20 +0200
commitea859f50d9438bc61ae96721a4d255b49de78653 (patch)
treebfb52a5f403ad1e86c562b2f4d608d1268fe8fcf /Process.c
parent266ab52b3a741a58fb17c48b0f7939d7c5d266de (diff)
downloaddebian_htop-ea859f50d9438bc61ae96721a4d255b49de78653.tar.gz
debian_htop-ea859f50d9438bc61ae96721a4d255b49de78653.tar.bz2
debian_htop-ea859f50d9438bc61ae96721a4d255b49de78653.zip
Imported Upstream version 0.6.2upstream/0.6.2
Diffstat (limited to 'Process.c')
-rw-r--r--Process.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/Process.c b/Process.c
index fae1ed4..0396151 100644
--- a/Process.c
+++ b/Process.c
@@ -1,6 +1,6 @@
/*
htop - Process.c
-(C) 2004,2005 Hisham H. Muhammad
+(C) 2004-2006 Hisham H. Muhammad
Released under the GNU GPL, see the COPYING file
in the source distribution for its full text.
*/
@@ -179,7 +179,7 @@ void Process_sendSignal(Process* this, int signal) {
/* private */
void Process_printLargeNumber(Process* this, RichString *str, unsigned int number) {
- char buffer[10];
+ char buffer[11];
int len;
if(number >= (1000 * ONE_M)) {
len = snprintf(buffer, 10, "%4.2fG ", (float)number / ONE_M);
@@ -206,7 +206,7 @@ void Process_printLargeNumber(Process* this, RichString *str, unsigned int numbe
double jiffy = 0.0;
/* private */
-void Process_printTime(RichString* str, unsigned long t) {
+static void Process_printTime(RichString* str, unsigned long t) {
if(jiffy == 0.0) jiffy = sysconf(_SC_CLK_TCK);
double jiffytime = 1.0 / jiffy;
@@ -217,7 +217,7 @@ void Process_printTime(RichString* str, unsigned long t) {
int minutes = (iRealTime / 60) % 60;
int seconds = iRealTime % 60;
int hundredths = (realTime - iRealTime) * 100;
- char buffer[10];
+ char buffer[11];
if (hours) {
snprintf(buffer, 10, "%2dh", hours);
RichString_append(str, CRT_colors[LARGE_NUMBER], buffer);
@@ -228,7 +228,8 @@ void Process_printTime(RichString* str, unsigned long t) {
RichString_append(str, CRT_colors[DEFAULT_COLOR], buffer);
}
-inline void Process_writeCommand(Process* this, int attr, RichString* str) {
+/* private */
+inline static void Process_writeCommand(Process* this, int attr, RichString* str) {
if (this->pl->highlightBaseName) {
char* firstSpace = strchr(this->comm, ' ');
if (firstSpace) {

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