diff options
Diffstat (limited to 'kcontrol/info')
-rw-r--r-- | kcontrol/info/Makefile.am | 2 | ||||
-rw-r--r-- | kcontrol/info/configure.in.in | 5 | ||||
-rw-r--r-- | kcontrol/info/info_aix.cpp | 2 | ||||
-rw-r--r-- | kcontrol/info/info_fbsd.cpp | 4 | ||||
-rw-r--r-- | kcontrol/info/info_generic.cpp | 2 | ||||
-rw-r--r-- | kcontrol/info/info_linux.cpp | 2 | ||||
-rw-r--r-- | kcontrol/info/info_netbsd.cpp | 6 | ||||
-rw-r--r-- | kcontrol/info/info_openbsd.cpp | 4 | ||||
-rw-r--r-- | kcontrol/info/info_osx.cpp | 4 | ||||
-rw-r--r-- | kcontrol/info/info_sgi.cpp | 2 | ||||
-rw-r--r-- | kcontrol/info/info_solaris.cpp | 12 | ||||
-rw-r--r-- | kcontrol/info/main.cpp | 26 | ||||
-rw-r--r-- | kcontrol/info/memory.cpp | 6 | ||||
-rw-r--r-- | kcontrol/info/memory_fbsd.cpp | 5 | ||||
-rw-r--r-- | kcontrol/info/memory_tru64.cpp | 83 |
15 files changed, 37 insertions, 128 deletions
diff --git a/kcontrol/info/Makefile.am b/kcontrol/info/Makefile.am index 30eb5ebe8..6db9c62b9 100644 --- a/kcontrol/info/Makefile.am +++ b/kcontrol/info/Makefile.am @@ -7,7 +7,7 @@ endif kcm_info_la_SOURCES = main.cpp memory.cpp opengl.cpp kcm_info_la_LDFLAGS = $(all_libraries) -module -avoid-version -no-undefined $(FRAMEWORK_COREAUDIO) -kcm_info_la_LIBADD = $(LIBALIB) $(LIB_TDEUI) $(LIB_TRU64_MACH) $(LIBCFG) $(LIBODM) $(LIBKSTAT) $(LIBDEVINFO) $(GLLIB) +kcm_info_la_LIBADD = $(LIBALIB) $(LIB_TDEUI) $(LIBCFG) $(LIBODM) $(LIBKSTAT) $(LIBDEVINFO) $(GLLIB) METASOURCES = AUTO AM_CPPFLAGS= $(all_includes) $(GLINC) diff --git a/kcontrol/info/configure.in.in b/kcontrol/info/configure.in.in index 9bc6d1c4b..cee8a2deb 100644 --- a/kcontrol/info/configure.in.in +++ b/kcontrol/info/configure.in.in @@ -1,11 +1,7 @@ -# libmach for Tru64 # linux/raw.h for Linux # devinfo.h, libdevinfo for the list of {IRQ,DMA,IOPORTS/MEMRANGES} for FreeBSD case "$host" in - *-*-osf*) - AC_CHECK_LIB(mach, vm_statistics, LIB_TRU64_MACH="-lmach")dnl - ;; *-*-linux*) AC_CHECK_HEADERS(linux/raw.h sys/raw.h)dnl ;; @@ -14,7 +10,6 @@ case "$host" in AC_CHECK_LIB(devinfo, devinfo_foreach_rman, LIBDEVINFO="-ldevinfo") ;; esac -AC_SUBST(LIB_TRU64_MACH) AC_HAVE_GL( have_gl=yes, have_gl=no ) AM_CONDITIONAL(COMPILE_GL_INFO, test x$have_gl = xyes) diff --git a/kcontrol/info/info_aix.cpp b/kcontrol/info/info_aix.cpp index 9aa0d3767..f4625813f 100644 --- a/kcontrol/info/info_aix.cpp +++ b/kcontrol/info/info_aix.cpp @@ -265,7 +265,7 @@ struct model _4C_models[] = }; -/* all GetInfo_ functions should return TRUE, when the Information +/* all GetInfo_ functions should return true, when the Information was filled into the lBox-Widget. returning false indicates, that information was not available. */ diff --git a/kcontrol/info/info_fbsd.cpp b/kcontrol/info/info_fbsd.cpp index 3ccd1c086..ec7b90bf8 100644 --- a/kcontrol/info/info_fbsd.cpp +++ b/kcontrol/info/info_fbsd.cpp @@ -21,8 +21,8 @@ /* - * all following functions should return TRUE, when the Information - * was filled into the lBox-Widget. Returning FALSE indicates that + * all following functions should return true, when the Information + * was filled into the lBox-Widget. Returning false indicates that * information was not available. */ diff --git a/kcontrol/info/info_generic.cpp b/kcontrol/info/info_generic.cpp index 367e1657b..c914159ab 100644 --- a/kcontrol/info/info_generic.cpp +++ b/kcontrol/info/info_generic.cpp @@ -25,7 +25,7 @@ #define INFO_CD_ROM_AVAILABLE -/* all following functions should return TRUE, when the Information +/* all following functions should return true, when the Information was filled into the lBox-Widget. returning false indicates, that information was not available. */ diff --git a/kcontrol/info/info_linux.cpp b/kcontrol/info/info_linux.cpp index bbda9691d..6354aa46d 100644 --- a/kcontrol/info/info_linux.cpp +++ b/kcontrol/info/info_linux.cpp @@ -293,7 +293,7 @@ static void cleanPassword(TQString & str) while (index >= 0) { - index = str.find(passwd, index, FALSE); + index = str.find(passwd, index, false); if (index >= 0) { index += passwd.length(); while (index < (int) str.length() && diff --git a/kcontrol/info/info_netbsd.cpp b/kcontrol/info/info_netbsd.cpp index 2fced7e40..73b252501 100644 --- a/kcontrol/info/info_netbsd.cpp +++ b/kcontrol/info/info_netbsd.cpp @@ -24,8 +24,8 @@ /* - * all following functions should return TRUE, when the Information - * was filled into the lBox-Widget. Returning FALSE indicates that + * all following functions should return true, when the Information + * was filled into the lBox-Widget. Returning false indicates that * information was not available. */ @@ -179,7 +179,7 @@ bool GetInfo_IRQ (TQListView *lBox) lBox->addColumn(i18n("IRQ")); lBox->addColumn(i18n("Device")); lBox->setSorting(0); - lBox->setShowSortIndicator(FALSE); + lBox->setShowSortIndicator(false); (void) GetDmesgInfo(lBox, "[ (]irq ", AddIRQLine); return true; } diff --git a/kcontrol/info/info_openbsd.cpp b/kcontrol/info/info_openbsd.cpp index 7b484da76..84000b79a 100644 --- a/kcontrol/info/info_openbsd.cpp +++ b/kcontrol/info/info_openbsd.cpp @@ -24,8 +24,8 @@ /* - * all following functions should return TRUE, when the Information - * was filled into the lBox-Widget. Returning FALSE indicates that + * all following functions should return true, when the Information + * was filled into the lBox-Widget. Returning false indicates that * information was not available. */ diff --git a/kcontrol/info/info_osx.cpp b/kcontrol/info/info_osx.cpp index 5f18aebea..96bfa75bb 100644 --- a/kcontrol/info/info_osx.cpp +++ b/kcontrol/info/info_osx.cpp @@ -31,8 +31,8 @@ #define INFO_XSERVER_AVAILABLE /* - * all following functions should return TRUE, when the Information - * was filled into the lBox-Widget. Returning FALSE indicates that + * all following functions should return true, when the Information + * was filled into the lBox-Widget. Returning false indicates that * information was not available. */ diff --git a/kcontrol/info/info_sgi.cpp b/kcontrol/info/info_sgi.cpp index 7961d4e16..f2740c0d4 100644 --- a/kcontrol/info/info_sgi.cpp +++ b/kcontrol/info/info_sgi.cpp @@ -15,7 +15,7 @@ #define INFO_XSERVER_AVAILABLE -/* all following functions should return TRUE, when the Information +/* all following functions should return true, when the Information was filled into the lBox-Widget. returning false indicates, that information was not available. */ diff --git a/kcontrol/info/info_solaris.cpp b/kcontrol/info/info_solaris.cpp index f52927424..f6ab922ea 100644 --- a/kcontrol/info/info_solaris.cpp +++ b/kcontrol/info/info_solaris.cpp @@ -486,7 +486,7 @@ TQString propvalue( di_prop_t prop ) { char *strp; int *intp; uchar_t *bytep; - QString result; + TQString result; /* * Since a lot of printable strings seem to be tagged as 'byte', @@ -565,11 +565,11 @@ int dump_node( di_node_t node, void *arg ) { TQListViewItem *top = (TQListViewItem *) arg, *parent, *previous; - char *path; - char *drivername; - char *names; - QString compatnames; - int i, n; + char *path; + char *drivername; + char *names; + TQString compatnames; + int i, n; di_prop_t prop; path = di_devfs_path( node ); diff --git a/kcontrol/info/main.cpp b/kcontrol/info/main.cpp index 780b6532e..85ef53687 100644 --- a/kcontrol/info/main.cpp +++ b/kcontrol/info/main.cpp @@ -34,7 +34,7 @@ extern "C" { - KDE_EXPORT TDECModule *create_cpu(TQWidget *parent, const char * /*name*/) + TDE_EXPORT TDECModule *create_cpu(TQWidget *parent, const char * /*name*/) { #ifdef INFO_CPU_AVAILABLE return new KInfoListWidget(i18n("Processor(s)"), parent, "kcminfo", GetInfo_CPU); @@ -43,7 +43,7 @@ extern "C" #endif } - KDE_EXPORT TDECModule *create_irq(TQWidget *parent, const char * /*name*/) + TDE_EXPORT TDECModule *create_irq(TQWidget *parent, const char * /*name*/) { #ifdef INFO_IRQ_AVAILABLE return new KInfoListWidget(i18n("Interrupt"), parent, "kcminfo", GetInfo_IRQ); @@ -52,7 +52,7 @@ extern "C" #endif } - KDE_EXPORT TDECModule *create_pci(TQWidget *parent, const char * /*name*/) + TDE_EXPORT TDECModule *create_pci(TQWidget *parent, const char * /*name*/) { #ifdef INFO_PCI_AVAILABLE return new KInfoListWidget(i18n("PCI"), parent, "kcminfo", GetInfo_PCI); @@ -61,7 +61,7 @@ extern "C" #endif } - KDE_EXPORT TDECModule *create_dma(TQWidget *parent, const char * /*name*/) + TDE_EXPORT TDECModule *create_dma(TQWidget *parent, const char * /*name*/) { #ifdef INFO_DMA_AVAILABLE return new KInfoListWidget(i18n("DMA-Channel"), parent, "kcminfo", GetInfo_DMA); @@ -70,7 +70,7 @@ extern "C" #endif } - KDE_EXPORT TDECModule *create_ioports(TQWidget *parent, const char * /*name*/) + TDE_EXPORT TDECModule *create_ioports(TQWidget *parent, const char * /*name*/) { #ifdef INFO_IOPORTS_AVAILABLE return new KInfoListWidget(i18n("I/O-Port"), parent, "kcminfo", GetInfo_IO_Ports); @@ -79,7 +79,7 @@ extern "C" #endif } - KDE_EXPORT TDECModule *create_sound(TQWidget *parent, const char * /*name*/) + TDE_EXPORT TDECModule *create_sound(TQWidget *parent, const char * /*name*/) { #ifdef INFO_SOUND_AVAILABLE return new KInfoListWidget(i18n("Soundcard"), parent, "kcminfo", GetInfo_Sound); @@ -88,7 +88,7 @@ extern "C" #endif } - KDE_EXPORT TDECModule *create_scsi(TQWidget *parent, const char * /*name*/) + TDE_EXPORT TDECModule *create_scsi(TQWidget *parent, const char * /*name*/) { #ifdef INFO_SCSI_AVAILABLE return new KInfoListWidget(i18n("SCSI"), parent, "kcminfo", GetInfo_SCSI); @@ -97,7 +97,7 @@ extern "C" #endif } - KDE_EXPORT TDECModule *create_devices(TQWidget *parent, const char * /*name*/) + TDE_EXPORT TDECModule *create_devices(TQWidget *parent, const char * /*name*/) { #ifdef INFO_DEVICES_AVAILABLE return new KInfoListWidget(i18n("Devices"), parent, "kcminfo", GetInfo_Devices); @@ -106,7 +106,7 @@ extern "C" #endif } - KDE_EXPORT TDECModule *create_partitions(TQWidget *parent, const char * /*name*/) + TDE_EXPORT TDECModule *create_partitions(TQWidget *parent, const char * /*name*/) { #ifdef INFO_PARTITIONS_AVAILABLE return new KInfoListWidget(i18n("Partitions"), parent, "kcminfo", GetInfo_Partitions); @@ -115,7 +115,7 @@ extern "C" #endif } - KDE_EXPORT TDECModule *create_xserver(TQWidget *parent, const char * /*name*/) + TDE_EXPORT TDECModule *create_xserver(TQWidget *parent, const char * /*name*/) { #ifdef INFO_XSERVER_AVAILABLE return new KInfoListWidget(i18n("X-Server"), parent, "kcminfo", GetInfo_XServer_and_Video); @@ -124,12 +124,12 @@ extern "C" #endif } - KDE_EXPORT TDECModule *create_memory(TQWidget *parent, const char * /*name*/) + TDE_EXPORT TDECModule *create_memory(TQWidget *parent, const char * /*name*/) { return new KMemoryWidget(parent, "kcminfo"); } - KDE_EXPORT TDECModule *create_opengl(TQWidget *parent, const char * ) + TDE_EXPORT TDECModule *create_opengl(TQWidget *parent, const char * ) { #ifdef INFO_OPENGL_AVAILABLE return new KInfoListWidget(i18n("OpenGL"), parent, "kcminfo", GetInfo_OpenGL); @@ -139,7 +139,7 @@ extern "C" } /* create_cdinfo function for CD-ROM Info ~Jahshan */ - KDE_EXPORT TDECModule *create_cdinfo(TQWidget *parent, const char * /*name*/) + TDE_EXPORT TDECModule *create_cdinfo(TQWidget *parent, const char * /*name*/) { #ifdef INFO_CD_ROM_AVAILABLE return new KInfoListWidget(i18n("CD-ROM Info"), parent, "kcminfo", GetInfo_CD_ROM); diff --git a/kcontrol/info/memory.cpp b/kcontrol/info/memory.cpp index 76d68d675..71e7a1dc8 100644 --- a/kcontrol/info/memory.cpp +++ b/kcontrol/info/memory.cpp @@ -252,8 +252,8 @@ KMemoryWidget::KMemoryWidget(TQWidget * parent, const char *name) timer = new TQTimer(this); timer->start(100); - TQObject::connect(timer, TQT_SIGNAL(timeout()), this, - TQT_SLOT(update_Values())); + TQObject::connect(timer, TQ_SIGNAL(timeout()), this, + TQ_SLOT(update_Values())); update(); } @@ -459,8 +459,6 @@ void KMemoryWidget::update_Values() #include "memory_hpux.cpp" #elif defined(__NetBSD__) || defined(__OpenBSD__) #include "memory_netbsd.cpp" -#elif __osf__ -#include "memory_tru64.cpp" #else /* Default for unsupported systems */ diff --git a/kcontrol/info/memory_fbsd.cpp b/kcontrol/info/memory_fbsd.cpp index 80a28749e..f307563f3 100644 --- a/kcontrol/info/memory_fbsd.cpp +++ b/kcontrol/info/memory_fbsd.cpp @@ -11,9 +11,9 @@ void KMemoryWidget::update() { - char blah[10], buf[80], *used_str, *total_str; + char buf[80], *used_str, *total_str; /* Stuff for sysctl */ - int memory; + unsigned long memory; size_t len; /* Stuff for swap display */ int used, total, _free; @@ -22,7 +22,6 @@ void KMemoryWidget::update() len=sizeof(memory); sysctlbyname("hw.physmem", &memory, &len, NULL, 0); - snprintf(blah, 10, "%d", memory); // Numerical values // total physical memory (without swap space) diff --git a/kcontrol/info/memory_tru64.cpp b/kcontrol/info/memory_tru64.cpp deleted file mode 100644 index c3cbb2fae..000000000 --- a/kcontrol/info/memory_tru64.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * This is memory_tru64.cpp to retrieve memory information under Tru64/Alpha. - * - * Implemented by Tom Leitner, Tom@radar.tu-graz.ac.at - * - * WARNING: This module requires linking with -lmach - * - * This routine is based on m_decosf1.c from the "top" program written by: - * - * AUTHOR: Anthony Baxter, <anthony@aaii.oz.au> - * - */ - -#include <stdio.h> -#include <unistd.h> -#include <sys/socket.h> -#include <sys/mbuf.h> -#include <net/route.h> -#include <sys/table.h> -extern "C" { -#include <mach/mach_traps.h> -} -#include <mach/vm_statistics.h> - -#define pagetob(size) (MEMORY(1024L) * ((long) (size) << (long) pageshift)) -#define LOG1024 10 - -extern "C" void vm_statistics(task_t, vm_statistics_data_t*); - -void KMemoryWidget::update() -{ - int pageshift; /* log base 2 of the pagesize */ - int pagesize; - vm_statistics_data_t vmstats; - int swap_pages=0,swap_free=0,i; - struct tbl_swapinfo swbuf; - - /* get the page size with "getpagesize" and calculate pageshift from it */ - - pagesize = getpagesize(); - pageshift = 0; - while (pagesize > 1) { - pageshift++; - pagesize >>= 1; - } - - /* we only need the amount of log(2)1024 for our conversion */ - - pageshift -= LOG1024; - - /* memory information */ - /* this is possibly bogus - we work out total # pages by */ - /* adding up the free, active, inactive, wired down, and */ - /* zero filled. Anyone who knows a better way, TELL ME! */ - /* Change: dont use zero filled. */ - - (void) ::vm_statistics(::task_self(), &vmstats); - - /* thanks DEC for the table() command. No thanks at all for */ - /* omitting the man page for it from OSF/1 1.2, and failing */ - /* to document SWAPINFO in the 1.3 man page. Lets hear it for */ - /* include files. */ - - i=0; - while(table(TBL_SWAPINFO,i,&swbuf,1,sizeof(struct tbl_swapinfo))>0) { - swap_pages += swbuf.size; - swap_free += swbuf.free; - i++; - } - Memory_Info[TOTAL_MEM] = pagetob((vmstats.free_count + - vmstats.active_count + - vmstats.inactive_count + - vmstats.wire_count)); - Memory_Info[FREE_MEM] = pagetob(vmstats.free_count); - Memory_Info[SHARED_MEM] = NO_MEMORY_INFO; /* FIXME ?? */ - Memory_Info[BUFFER_MEM] = NO_MEMORY_INFO; /* FIXME ?? */ -#ifdef __GNUC__ -#warning "FIXME: Memory_Info[CACHED_MEM]" -#endif - Memory_Info[CACHED_MEM] = NO_MEMORY_INFO; /* cached memory in ram */ - Memory_Info[SWAP_MEM] = pagetob(swap_pages); - Memory_Info[FREESWAP_MEM] = pagetob(swap_free); -} |