summaryrefslogtreecommitdiffstats
path: root/ksysguard
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-12-11 20:21:27 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-12-11 20:21:27 +0000
commit10e41144596fc9ced40fc349d9ecd099b1c2ea19 (patch)
tree88ab04e475ff5a4cd889cb082f5760b6e0bf5e4e /ksysguard
parent4aed2c8219774f5d797760606b8489a92ddc5163 (diff)
downloadtdebase-10e41144596fc9ced40fc349d9ecd099b1c2ea19.tar.gz
tdebase-10e41144596fc9ced40fc349d9ecd099b1c2ea19.zip
Initial import of Trinity 3.5.11 to kdebase
Extends krandrtray, adds iccconfig kcontrol module, adds run dialog autocomplete and lots of bugfixes Will need to check for commit warnings and repair as encountered Also needs full compile test git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1061475 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksysguard')
-rw-r--r--ksysguard/configure.in.in1
-rw-r--r--ksysguard/gui/Makefile.am2
-rw-r--r--ksysguard/ksysguardd/Linux/ProcessList.c2
-rw-r--r--ksysguard/ksysguardd/Linux/acpi.c12
-rw-r--r--ksysguard/ksysguardd/Linux/cpuinfo.c2
-rw-r--r--ksysguard/ksysguardd/Linux/netdev.c10
-rw-r--r--ksysguard/ksysguardd/Linux/stat.c6
-rw-r--r--ksysguard/ksysguardd/Solaris/NetDev.c36
-rw-r--r--ksysguard/ksysguardd/Tru64/NetDev.c36
-rw-r--r--ksysguard/ksysguardd/conf.c8
10 files changed, 58 insertions, 57 deletions
diff --git a/ksysguard/configure.in.in b/ksysguard/configure.in.in
index 0173b28e..f4ab8385 100644
--- a/ksysguard/configure.in.in
+++ b/ksysguard/configure.in.in
@@ -3,6 +3,7 @@ AC_MSG_CHECKING([if ksysguardd can be compiled])
case "$host" in
*-*-linux*) ksysguardd_compile=yes; UNAME='Linux' ;;
*-*-freebsd*) ksysguardd_compile=yes; UNAME='FreeBSD' ;;
+ *-*-kfreebsd*-gnu) ksysguardd_compile=yes; UNAME='Linux' ;;
*-*-dragonfly*) ksysguardd_compile=yes; UNAME='FreeBSD' ;;
*-*-netbsd*) ksysguardd_compile=yes; UNAME='NetBSD' ;;
*-*-solaris*) ksysguardd_compile=yes; UNAME='Solaris' ;;
diff --git a/ksysguard/gui/Makefile.am b/ksysguard/gui/Makefile.am
index c0b9d12b..fd798bc6 100644
--- a/ksysguard/gui/Makefile.am
+++ b/ksysguard/gui/Makefile.am
@@ -59,5 +59,5 @@ METASOURCES = AUTO
messages: rc.cpp
$(EXTRACTRC) `find . -name "*.ui"` >> rc.cpp
- $(EXTRACTATTR) --attr=display,title SystemLoad.sgrd KSysGuardApplet.xml >> rc.cpp
+ extractattr --attr=display,title SystemLoad.sgrd KSysGuardApplet.xml >> rc.cpp
$(XGETTEXT) `find . -name "*.cpp" -o -name "*.cc"` -o $(podir)/ksysguard.pot
diff --git a/ksysguard/ksysguardd/Linux/ProcessList.c b/ksysguard/ksysguardd/Linux/ProcessList.c
index b267c700..e9e8c131 100644
--- a/ksysguard/ksysguardd/Linux/ProcessList.c
+++ b/ksysguard/ksysguardd/Linux/ProcessList.c
@@ -292,7 +292,7 @@ static int updateProcess( int pid )
strncmp( ps->cmdline, "kdeinit: ", KDEINITLEN ) == 0 &&
strcmp( ps->cmdline + KDEINITLEN, "Running..." ) != 0 ) {
size_t len;
- char* end = strchr( ps->cmdline + KDEINITLEN, ' ' );
+ char* end = (char*)strchr( ps->cmdline + KDEINITLEN, ' ' );
if ( end )
len = ( end - ps->cmdline ) - KDEINITLEN;
else
diff --git a/ksysguard/ksysguardd/Linux/acpi.c b/ksysguard/ksysguardd/Linux/acpi.c
index b3100c36..6e9470b5 100644
--- a/ksysguard/ksysguardd/Linux/acpi.c
+++ b/ksysguard/ksysguardd/Linux/acpi.c
@@ -130,7 +130,7 @@ int updateAcpiBattery( void )
p = AcpiBatInfoBuf;
while ( ( p!= NULL ) && ( sscanf( p, "last full capacity: %d ",
&AcpiBatCapacity ) != 1 ) ) {
- p = strchr( p, '\n' );
+ p = (char*)strchr( p, '\n' );
if ( p )
p++;
}
@@ -152,7 +152,7 @@ int updateAcpiBattery( void )
p = AcpiBatStateBuf;
while ( ( p!= NULL ) && ( sscanf( p, "remaining capacity: %d ",
&AcpiBatRemainingCapacity ) != 1 ) ) {
- p = strchr( p, '\n' );
+ p = (char*)strchr( p, '\n' );
if ( p )
p++;
}
@@ -161,7 +161,7 @@ int updateAcpiBattery( void )
p = AcpiBatStateBuf;
while ( ( p!= NULL ) && ( sscanf( p, "present rate: %d ",
&AcpiBatteryUsage[i] ) != 1 ) ) {
- p = strchr( p, '\n' );
+ p = (char*)strchr( p, '\n' );
if ( p )
p++;
}
@@ -229,12 +229,12 @@ void printAcpiBatUsageInfo( const char* cmd)
static int extract_zone_name(char **startidx, const char *cmd)
{
char *idx = NULL;
- idx = strchr(cmd, '/');
+ idx = (char*)strchr(cmd, '/');
if (idx == NULL) return 0;
- idx = strchr(idx+1, '/');
+ idx = (char*)strchr(idx+1, '/');
if (idx == NULL) return 0;
*startidx = idx+1;
- idx = strchr(*startidx, '/');
+ idx = (char*)strchr(*startidx, '/');
if (idx == NULL) return 0;
return idx - *startidx;
}
diff --git a/ksysguard/ksysguardd/Linux/cpuinfo.c b/ksysguard/ksysguardd/Linux/cpuinfo.c
index de5deb80..fa55aabd 100644
--- a/ksysguard/ksysguardd/Linux/cpuinfo.c
+++ b/ksysguard/ksysguardd/Linux/cpuinfo.c
@@ -83,7 +83,7 @@ static void processCpuInfo( void )
sscanf( value, "%f", &Clocks[ cpuId ] );
/* Move cibp to begining of next line, if there is one. */
- cibp = strchr( cibp, '\n' );
+ cibp = (char*)strchr( cibp, '\n' );
if ( cibp )
cibp++;
else
diff --git a/ksysguard/ksysguardd/Linux/netdev.c b/ksysguard/ksysguardd/Linux/netdev.c
index 55e81280..86767864 100644
--- a/ksysguard/ksysguardd/Linux/netdev.c
+++ b/ksysguard/ksysguardd/Linux/netdev.c
@@ -142,7 +142,7 @@ static int processNetDev_( void )
netDevBufP += strlen( buf ) + 1; /* move netDevBufP to next line */
if ( sscanf( buf, devFormat, tag ) ) {
- char* pos = strchr( tag, ':' );
+ char* pos = (char*)strchr( tag, ':' );
if ( pos ) {
FORALL( DEFVARS );
*pos = '\0';
@@ -227,7 +227,7 @@ void initNetDev( struct SensorModul* sm )
netDevBufP += strlen( buf ) + 1; /* move netDevBufP to next line */
if ( sscanf( buf, devFormat, tag ) ) {
- char* pos = strchr( tag, ':' );
+ char* pos = (char*)strchr( tag, ':' );
if ( pos ) {
char mon[ MON_SIZE ];
*pos = '\0';
@@ -339,9 +339,9 @@ void printNetDev##a( const char* cmd ) \
char* end; \
char dev[ 64 ]; \
\
- beg = strchr( cmd, '/' ); \
- beg = strchr( beg + 1, '/' ); \
- end = strchr( beg + 1, '/' ); \
+ beg = (char*)strchr( cmd, '/' ); \
+ beg = (char*)strchr( beg + 1, '/' ); \
+ end = (char*)strchr( beg + 1, '/' ); \
strncpy( dev, beg + 1, end - beg - 1 ); \
dev[ end - beg - 1 ] = '\0'; \
\
diff --git a/ksysguard/ksysguardd/Linux/stat.c b/ksysguard/ksysguardd/Linux/stat.c
index 0e03e4d5..9bc576de 100644
--- a/ksysguard/ksysguardd/Linux/stat.c
+++ b/ksysguard/ksysguardd/Linux/stat.c
@@ -267,10 +267,10 @@ static int processDiskIO( const char* buf )
}
/* Move p after the sencond ')'. We can safely assume that
* those two ')' exist. */
- p = strchr( p, ')' ) + 1;
- p = strchr( p, ')' ) + 1;
+ p = (char*)strchr( p, ')' ) + 1;
+ p = (char*)strchr( p, ')' ) + 1;
if ( p && *p )
- p = strchr( p, '(' );
+ p = (char*)strchr( p, '(' );
}
return 0;
diff --git a/ksysguard/ksysguardd/Solaris/NetDev.c b/ksysguard/ksysguardd/Solaris/NetDev.c
index 89db266c..836e2832 100644
--- a/ksysguard/ksysguardd/Solaris/NetDev.c
+++ b/ksysguard/ksysguardd/Solaris/NetDev.c
@@ -436,9 +436,9 @@ void printIPackets( const char *cmd ) {
char *name, *ptr;
int i;
- ptr = strchr( cmdcopy, (int) '/' );
+ ptr = (char*)strchr( cmdcopy, (int) '/' );
name = ++ptr;
- ptr = strchr( name, (int) '/' );
+ ptr = (char*)strchr( name, (int) '/' );
*ptr = '\0';
for( i = 0; i < NetDevCount; i++ ) {
@@ -464,9 +464,9 @@ void printOPackets( const char *cmd ) {
char *name, *ptr;
int i;
- ptr = strchr( cmdcopy, (int) '/' );
+ ptr = (char*)strchr( cmdcopy, (int) '/' );
name = ++ptr;
- ptr = strchr( name, (int) '/' );
+ ptr = (char*)strchr( name, (int) '/' );
*ptr = '\0';
for( i = 0; i < NetDevCount; i++ ) {
@@ -492,9 +492,9 @@ void printIErrors( const char *cmd ) {
char *name, *ptr;
int i;
- ptr = strchr( cmdcopy, (int) '/' );
+ ptr = (char*)strchr( cmdcopy, (int) '/' );
name = ++ptr;
- ptr = strchr( name, (int) '/' );
+ ptr = (char*)strchr( name, (int) '/' );
*ptr = '\0';
for( i = 0; i < NetDevCount; i++ ) {
@@ -520,9 +520,9 @@ void printOErrors( const char *cmd ) {
char *name, *ptr;
int i;
- ptr = strchr( cmdcopy, (int) '/' );
+ ptr = (char*)strchr( cmdcopy, (int) '/' );
name = ++ptr;
- ptr = strchr( name, (int) '/' );
+ ptr = (char*)strchr( name, (int) '/' );
*ptr = '\0';
for( i = 0; i < NetDevCount; i++ ) {
@@ -548,9 +548,9 @@ void printCollisions( const char *cmd ) {
char *name, *ptr;
int i;
- ptr = strchr( cmdcopy, (int) '/' );
+ ptr = (char*)strchr( cmdcopy, (int) '/' );
name = ++ptr;
- ptr = strchr( name, (int) '/' );
+ ptr = (char*)strchr( name, (int) '/' );
*ptr = '\0';
for( i = 0; i < NetDevCount; i++ ) {
@@ -576,9 +576,9 @@ void printMultiXmits( const char *cmd ) {
char *name, *ptr;
int i;
- ptr = strchr( cmdcopy, (int) '/' );
+ ptr = (char*)strchr( cmdcopy, (int) '/' );
name = ++ptr;
- ptr = strchr( name, (int) '/' );
+ ptr = (char*)strchr( name, (int) '/' );
*ptr = '\0';
for( i = 0; i < NetDevCount; i++ ) {
@@ -604,9 +604,9 @@ void printMultiRecvs( const char *cmd ) {
char *name, *ptr;
int i;
- ptr = strchr( cmdcopy, (int) '/' );
+ ptr = (char*)strchr( cmdcopy, (int) '/' );
name = ++ptr;
- ptr = strchr( name, (int) '/' );
+ ptr = (char*)strchr( name, (int) '/' );
*ptr = '\0';
for( i = 0; i < NetDevCount; i++ ) {
@@ -632,9 +632,9 @@ void printBcastXmits( const char *cmd ) {
char *name, *ptr;
int i;
- ptr = strchr( cmdcopy, (int) '/' );
+ ptr = (char*)strchr( cmdcopy, (int) '/' );
name = ++ptr;
- ptr = strchr( name, (int) '/' );
+ ptr = (char*)strchr( name, (int) '/' );
*ptr = '\0';
for( i = 0; i < NetDevCount; i++ ) {
@@ -660,9 +660,9 @@ void printBcastRecvs( const char *cmd ) {
char *name, *ptr;
int i;
- ptr = strchr( cmdcopy, (int) '/' );
+ ptr = (char*)strchr( cmdcopy, (int) '/' );
name = ++ptr;
- ptr = strchr( name, (int) '/' );
+ ptr = (char*)strchr( name, (int) '/' );
*ptr = '\0';
for( i = 0; i < NetDevCount; i++ ) {
diff --git a/ksysguard/ksysguardd/Tru64/NetDev.c b/ksysguard/ksysguardd/Tru64/NetDev.c
index 0699b929..a28c7ecf 100644
--- a/ksysguard/ksysguardd/Tru64/NetDev.c
+++ b/ksysguard/ksysguardd/Tru64/NetDev.c
@@ -435,9 +435,9 @@ void printIPackets( const char *cmd ) {
char *name, *ptr;
int i;
- ptr = strchr( cmdcopy, (int) '/' );
+ ptr = (char*)strchr( cmdcopy, (int) '/' );
name = ++ptr;
- ptr = strchr( name, (int) '/' );
+ ptr = (char*)strchr( name, (int) '/' );
*ptr = '\0';
for( i = 0; i < NetDevCount; i++ ) {
@@ -463,9 +463,9 @@ void printOPackets( const char *cmd ) {
char *name, *ptr;
int i;
- ptr = strchr( cmdcopy, (int) '/' );
+ ptr = (char*)strchr( cmdcopy, (int) '/' );
name = ++ptr;
- ptr = strchr( name, (int) '/' );
+ ptr = (char*)strchr( name, (int) '/' );
*ptr = '\0';
for( i = 0; i < NetDevCount; i++ ) {
@@ -491,9 +491,9 @@ void printIErrors( const char *cmd ) {
char *name, *ptr;
int i;
- ptr = strchr( cmdcopy, (int) '/' );
+ ptr = (char*)strchr( cmdcopy, (int) '/' );
name = ++ptr;
- ptr = strchr( name, (int) '/' );
+ ptr = (char*)strchr( name, (int) '/' );
*ptr = '\0';
for( i = 0; i < NetDevCount; i++ ) {
@@ -519,9 +519,9 @@ void printOErrors( const char *cmd ) {
char *name, *ptr;
int i;
- ptr = strchr( cmdcopy, (int) '/' );
+ ptr = (char*)strchr( cmdcopy, (int) '/' );
name = ++ptr;
- ptr = strchr( name, (int) '/' );
+ ptr = (char*)strchr( name, (int) '/' );
*ptr = '\0';
for( i = 0; i < NetDevCount; i++ ) {
@@ -547,9 +547,9 @@ void printCollisions( const char *cmd ) {
char *name, *ptr;
int i;
- ptr = strchr( cmdcopy, (int) '/' );
+ ptr = (char*)strchr( cmdcopy, (int) '/' );
name = ++ptr;
- ptr = strchr( name, (int) '/' );
+ ptr = (char*)strchr( name, (int) '/' );
*ptr = '\0';
for( i = 0; i < NetDevCount; i++ ) {
@@ -575,9 +575,9 @@ void printMultiXmits( const char *cmd ) {
char *name, *ptr;
int i;
- ptr = strchr( cmdcopy, (int) '/' );
+ ptr = (char*)strchr( cmdcopy, (int) '/' );
name = ++ptr;
- ptr = strchr( name, (int) '/' );
+ ptr = (char*)strchr( name, (int) '/' );
*ptr = '\0';
for( i = 0; i < NetDevCount; i++ ) {
@@ -603,9 +603,9 @@ void printMultiRecvs( const char *cmd ) {
char *name, *ptr;
int i;
- ptr = strchr( cmdcopy, (int) '/' );
+ ptr = (char*)strchr( cmdcopy, (int) '/' );
name = ++ptr;
- ptr = strchr( name, (int) '/' );
+ ptr = (char*)strchr( name, (int) '/' );
*ptr = '\0';
for( i = 0; i < NetDevCount; i++ ) {
@@ -631,9 +631,9 @@ void printBcastXmits( const char *cmd ) {
char *name, *ptr;
int i;
- ptr = strchr( cmdcopy, (int) '/' );
+ ptr = (char*)strchr( cmdcopy, (int) '/' );
name = ++ptr;
- ptr = strchr( name, (int) '/' );
+ ptr = (char*)strchr( name, (int) '/' );
*ptr = '\0';
for( i = 0; i < NetDevCount; i++ ) {
@@ -659,9 +659,9 @@ void printBcastRecvs( const char *cmd ) {
char *name, *ptr;
int i;
- ptr = strchr( cmdcopy, (int) '/' );
+ ptr = (char*)strchr( cmdcopy, (int) '/' );
name = ++ptr;
- ptr = strchr( name, (int) '/' );
+ ptr = (char*)strchr( name, (int) '/' );
*ptr = '\0';
for( i = 0; i < NetDevCount; i++ ) {
diff --git a/ksysguard/ksysguardd/conf.c b/ksysguard/ksysguardd/conf.c
index 1d857137..7f48ee59 100644
--- a/ksysguard/ksysguardd/conf.c
+++ b/ksysguard/ksysguardd/conf.c
@@ -93,9 +93,9 @@ void parseConfigFile( const char *filename )
if ( line[ strlen( line ) - 1 ] == '\n' )
line[ strlen( line ) - 1 ] = '\0';
- if ( !strncmp( line, "RegisterDomain",14) && (begin = strchr( line, '=' )) ) RegisterDomain=strdup(begin+1);
+ if ( !strncmp( line, "RegisterDomain",14) && (begin = (char*)strchr( line, '=' )) ) RegisterDomain=strdup(begin+1);
- if ( !strncmp( line, "LogFiles", 8 ) && (begin = strchr( line, '=' )) ) {
+ if ( !strncmp( line, "LogFiles", 8 ) && (begin = (char*)strchr( line, '=' )) ) {
begin++;
for ( token = strtok( begin, "," ); token; token = strtok( NULL, "," ) ) {
@@ -104,7 +104,7 @@ void parseConfigFile( const char *filename )
continue;
}
confLog->name = strdup( token );
- tmp = strchr( confLog->name, ':' );
+ tmp = (char*)strchr( confLog->name, ':' );
*tmp = '\0';
confLog->path = tmp;
confLog->path++;
@@ -113,7 +113,7 @@ void parseConfigFile( const char *filename )
}
}
- if ( !strncmp( line, "Sensors", 7 ) && (begin = strchr( line, '=' )) ) {
+ if ( !strncmp( line, "Sensors", 7 ) && (begin = (char*)strchr( line, '=' )) ) {
begin++;
for ( token = strtok( begin, ","); token; token = strtok( NULL, "," ) )