diff options
author | Daniel Lange <DLange@git.local> | 2016-04-11 13:00:18 +0200 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2016-04-11 13:00:18 +0200 |
commit | 031c3bb95f3d0a74d985286068baa6dd4d29d83f (patch) | |
tree | f8258f898976e17dfbc9df30ca357be6cb3605a5 | |
parent | bb3dd9e92f5a33ba5dd1192edc1671192e63cc8e (diff) | |
download | debian_htop-031c3bb95f3d0a74d985286068baa6dd4d29d83f.tar.gz debian_htop-031c3bb95f3d0a74d985286068baa6dd4d29d83f.tar.bz2 debian_htop-031c3bb95f3d0a74d985286068baa6dd4d29d83f.zip |
Imported Upstream version 0.5.3upstream/0.5.3
-rw-r--r-- | CPUMeter.c | 8 | ||||
-rw-r--r-- | ChangeLog | 20 | ||||
-rw-r--r-- | DebugMemory.c | 2 | ||||
-rw-r--r-- | FunctionBar.c | 2 | ||||
-rw-r--r-- | Header.c | 2 | ||||
-rw-r--r-- | ListBox.c | 8 | ||||
-rw-r--r-- | Makefile.am | 5 | ||||
-rw-r--r-- | Makefile.in | 15 | ||||
-rw-r--r-- | Meter.c | 5 | ||||
-rw-r--r-- | Process.c | 3 | ||||
-rw-r--r-- | Process.h | 2 | ||||
-rw-r--r-- | ProcessList.c | 50 | ||||
-rw-r--r-- | README | 6 | ||||
-rw-r--r-- | RichString.c | 5 | ||||
-rw-r--r-- | Settings.c | 24 | ||||
-rw-r--r-- | SignalItem.c (renamed from Signal.c) | 2 | ||||
-rw-r--r-- | SignalItem.h (renamed from Signal.h) | 0 | ||||
-rw-r--r-- | SignalsListBox.c | 2 | ||||
-rw-r--r-- | SignalsListBox.h | 2 | ||||
-rw-r--r-- | UsersTable.c | 6 | ||||
-rw-r--r-- | config.h | 6 | ||||
-rwxr-xr-x | configure | 71 | ||||
-rw-r--r-- | configure.ac | 5 | ||||
-rw-r--r-- | htop.c | 2 | ||||
-rw-r--r-- | htop.h | 2 |
25 files changed, 166 insertions, 89 deletions
@@ -14,7 +14,6 @@ in the source distribution for its full text. #include <curses.h> #include <string.h> #include <math.h> -#include <sys/param.h> #include "debug.h" #include <assert.h> @@ -31,6 +30,13 @@ struct CPUMeter_ { }*/ +#ifndef MIN +#define MIN(a,b) ((a)<(b)?(a):(b)) +#endif +#ifndef MAX +#define MAX(a,b) ((a)>(b)?(a):(b)) +#endif + CPUMeter* CPUMeter_new(ProcessList* pl, int processor) { CPUMeter* this = malloc(sizeof(CPUMeter)); char* caption; @@ -1,4 +1,24 @@ +What's new in version 0.5.3 + +* Read new field "steal" on newer /proc/stat files +* Auto-detects format of /proc/stat, to cope + with patched 2.4 kernels which display 2.6-style + information (most notably those on RHEL 3) + (thanks to Fernando Dotta for the report) +* Support $HOME_ETC initiative + (see http://www.pld-linux.org/Docs/home-etc) + (thanks to Roman Barczynski for the tip) +* The configure script now tests for /proc, so + that it fails early on unsupported platforms + instead of during compilation/execution. +* Made presentation of the function keys in the + status bar consistent across views + (thanks to David Mathog for the report) +* Minor changes to make the codebase more friendly + to possible future ports + (thanks to Jari Aalto and David Mathog for the reports) + What's new in version 0.5.2 * BUGFIX: Correct display of user field diff --git a/DebugMemory.c b/DebugMemory.c index 26db5c7..8f28af6 100644 --- a/DebugMemory.c +++ b/DebugMemory.c @@ -46,7 +46,7 @@ void DebugMemory_new() { singleton->allocations = 0; singleton->deallocations = 0; singleton->size = 0; - singleton->file = fopen("alloc.txt", "w"); + singleton->file = fopen("/tmp/htop-debug-alloc.txt", "w"); } void* DebugMemory_malloc(int size, char* file, int line) { diff --git a/FunctionBar.c b/FunctionBar.c index 49597bd..d2ad57b 100644 --- a/FunctionBar.c +++ b/FunctionBar.c @@ -28,7 +28,7 @@ typedef struct FunctionBar_ { }*/ /* private property */ -char* FunctionBar_FKeys[10] = {" 1", " 2", " 3", " 4", " 5", " 6", " 7", " 8", " 9", "10"}; +char* FunctionBar_FKeys[10] = {"F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10"}; /* private property */ int FunctionBar_FEvents[10] = {KEY_F(1), KEY_F(2), KEY_F(3), KEY_F(4), KEY_F(5), KEY_F(6), KEY_F(7), KEY_F(8), KEY_F(9), KEY_F(10)}; @@ -36,6 +36,8 @@ typedef struct Header_ { }*/ +#define MAX(a,b) ((a)>(b)?(a):(b)) + Header* Header_new(ProcessList* pl) { Header* this = malloc(sizeof(Header)); this->leftMeters = TypedVector_new(METER_CLASS, true, DEFAULT_SIZE); @@ -12,7 +12,6 @@ in the source distribution for its full text. #include "RichString.h" #include <math.h> -#include <sys/param.h> #include <stdbool.h> #include "debug.h" @@ -50,6 +49,13 @@ extern char* LISTBOX_CLASS; }*/ +#ifndef MIN +#define MIN(a,b) ((a)<(b)?(a):(b)) +#endif +#ifndef MAX +#define MAX(a,b) ((a)>(b)?(a):(b)) +#endif + /* private property */ char* LISTBOX_CLASS = "ListBox"; diff --git a/Makefile.am b/Makefile.am index d4a42a5..2302b3f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,17 +4,18 @@ dist_man_MANS = htop.1 EXTRA_DIST = $(dist_man_MANS) AM_CFLAGS = -pedantic -Wall -std=c99 +AM_CPPFLAGS = -DSYSCONFDIR=\"$(sysconfdir)\" htop_SOURCES = AvailableMetersListBox.c CategoriesListBox.c ClockMeter.c \ CPUMeter.c CRT.c DebugMemory.c DisplayOptionsListBox.c FunctionBar.c \ Hashtable.c Header.c htop.c ListBox.c ListItem.c LoadAverageMeter.c \ LoadMeter.c MemoryMeter.c Meter.c MetersListBox.c Object.c Process.c \ -ProcessList.c RichString.c ScreenManager.c Settings.c Signal.c \ +ProcessList.c RichString.c ScreenManager.c Settings.c SignalItem.c \ SignalsListBox.c String.c SwapMeter.c TasksMeter.c TypedVector.c \ UptimeMeter.c UsersTable.c AvailableMetersListBox.h CategoriesListBox.h \ ClockMeter.h config.h CPUMeter.h CRT.h debug.h DebugMemory.h \ DisplayOptionsListBox.h FunctionBar.h Hashtable.h Header.h htop.h ListBox.h \ ListItem.h LoadAverageMeter.h LoadMeter.h MemoryMeter.h Meter.h \ MetersListBox.h Object.h Process.h ProcessList.h RichString.h ScreenManager.h \ -Settings.h Signal.h SignalsListBox.h String.h SwapMeter.h TasksMeter.h \ +Settings.h SignalItem.h SignalsListBox.h String.h SwapMeter.h TasksMeter.h \ TypedVector.h UptimeMeter.h UsersTable.h CheckItem.c CheckItem.h diff --git a/Makefile.in b/Makefile.in index e08dfde..bdcceb7 100644 --- a/Makefile.in +++ b/Makefile.in @@ -65,10 +65,10 @@ am_htop_OBJECTS = AvailableMetersListBox.$(OBJEXT) \ MemoryMeter.$(OBJEXT) Meter.$(OBJEXT) MetersListBox.$(OBJEXT) \ Object.$(OBJEXT) Process.$(OBJEXT) ProcessList.$(OBJEXT) \ RichString.$(OBJEXT) ScreenManager.$(OBJEXT) \ - Settings.$(OBJEXT) Signal.$(OBJEXT) SignalsListBox.$(OBJEXT) \ - String.$(OBJEXT) SwapMeter.$(OBJEXT) TasksMeter.$(OBJEXT) \ - TypedVector.$(OBJEXT) UptimeMeter.$(OBJEXT) \ - UsersTable.$(OBJEXT) CheckItem.$(OBJEXT) + Settings.$(OBJEXT) SignalItem.$(OBJEXT) \ + SignalsListBox.$(OBJEXT) String.$(OBJEXT) SwapMeter.$(OBJEXT) \ + TasksMeter.$(OBJEXT) TypedVector.$(OBJEXT) \ + UptimeMeter.$(OBJEXT) UsersTable.$(OBJEXT) CheckItem.$(OBJEXT) htop_OBJECTS = $(am_htop_OBJECTS) htop_LDADD = $(LDADD) DEFAULT_INCLUDES = -I. -I$(srcdir) -I. @@ -170,18 +170,19 @@ target_alias = @target_alias@ dist_man_MANS = htop.1 EXTRA_DIST = $(dist_man_MANS) AM_CFLAGS = -pedantic -Wall -std=c99 +AM_CPPFLAGS = -DSYSCONFDIR=\"$(sysconfdir)\" htop_SOURCES = AvailableMetersListBox.c CategoriesListBox.c ClockMeter.c \ CPUMeter.c CRT.c DebugMemory.c DisplayOptionsListBox.c FunctionBar.c \ Hashtable.c Header.c htop.c ListBox.c ListItem.c LoadAverageMeter.c \ LoadMeter.c MemoryMeter.c Meter.c MetersListBox.c Object.c Process.c \ -ProcessList.c RichString.c ScreenManager.c Settings.c Signal.c \ +ProcessList.c RichString.c ScreenManager.c Settings.c SignalItem.c \ SignalsListBox.c String.c SwapMeter.c TasksMeter.c TypedVector.c \ UptimeMeter.c UsersTable.c AvailableMetersListBox.h CategoriesListBox.h \ ClockMeter.h config.h CPUMeter.h CRT.h debug.h DebugMemory.h \ DisplayOptionsListBox.h FunctionBar.h Hashtable.h Header.h htop.h ListBox.h \ ListItem.h LoadAverageMeter.h LoadMeter.h MemoryMeter.h Meter.h \ MetersListBox.h Object.h Process.h ProcessList.h RichString.h ScreenManager.h \ -Settings.h Signal.h SignalsListBox.h String.h SwapMeter.h TasksMeter.h \ +Settings.h SignalItem.h SignalsListBox.h String.h SwapMeter.h TasksMeter.h \ TypedVector.h UptimeMeter.h UsersTable.h CheckItem.c CheckItem.h all: config.h @@ -296,7 +297,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RichString.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ScreenManager.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Settings.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Signal.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SignalItem.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SignalsListBox.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/String.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SwapMeter.Po@am__quote@ @@ -15,7 +15,6 @@ in the source distribution for its full text. #include <curses.h> #include <string.h> #include <math.h> -#include <sys/param.h> #include "debug.h" #include <assert.h> @@ -64,6 +63,10 @@ extern char* METER_CLASS; }*/ +#ifndef MIN +#define MIN(a,b) ((a)<(b)?(a):(b)) +#endif + /* private property */ char* METER_CLASS = "Meter"; @@ -40,7 +40,7 @@ int kill(pid_t pid, int signal); typedef enum ProcessField_ { PID, COMM, STATE, PPID, PGRP, SESSION, TTY_NR, TPGID, FLAGS, MINFLT, CMINFLT, MAJFLT, CMAJFLT, UTIME, STIME, CUTIME, CSTIME, PRIORITY, NICE, ITREALVALUE, STARTTIME, VSIZE, RSS, RLIM, STARTCODE, ENDCODE, - STARTSTACK, KSTKESP, KSTKEIP, SIGNAL, BLOCKED, SIGIGNORE, SIGCATCH, WCHAN, NSWAP, CNSWAP, EXIT_SIGNAL, + STARTSTACK, KSTKESP, KSTKEIP, SIGNAL, BLOCKED, SSIGIGNORE, SIGCATCH, WCHAN, NSWAP, CNSWAP, EXIT_SIGNAL, PROCESSOR, M_SIZE, M_RESIDENT, M_SHARE, M_TRS, M_DRS, M_LRS, M_DT, ST_UID, PERCENT_CPU, PERCENT_MEM, USER, TIME, LAST_PROCESSFIELD } ProcessField; @@ -268,6 +268,7 @@ void Process_writeField(Process* this, RichString* str, ProcessField field) { case SESSION: snprintf(buffer, n, "%5d ", this->session); break; case TTY_NR: snprintf(buffer, n, "%5d ", this->tty_nr); break; case TPGID: snprintf(buffer, n, "%5d ", this->tpgid); break; + case PROCESSOR: snprintf(buffer, n, "%3d ", this->processor+1); break; case COMM: { if (!this->pl->treeView || this->indent == 0) { Process_writeCommand(this, attr, str); @@ -42,7 +42,7 @@ int kill(pid_t pid, int signal); typedef enum ProcessField_ { PID, COMM, STATE, PPID, PGRP, SESSION, TTY_NR, TPGID, FLAGS, MINFLT, CMINFLT, MAJFLT, CMAJFLT, UTIME, STIME, CUTIME, CSTIME, PRIORITY, NICE, ITREALVALUE, STARTTIME, VSIZE, RSS, RLIM, STARTCODE, ENDCODE, - STARTSTACK, KSTKESP, KSTKEIP, SIGNAL, BLOCKED, SIGIGNORE, SIGCATCH, WCHAN, NSWAP, CNSWAP, EXIT_SIGNAL, + STARTSTACK, KSTKESP, KSTKEIP, SIGNAL, BLOCKED, SSIGIGNORE, SIGCATCH, WCHAN, NSWAP, CNSWAP, EXIT_SIGNAL, PROCESSOR, M_SIZE, M_RESIDENT, M_SHARE, M_TRS, M_DRS, M_LRS, M_DT, ST_UID, PERCENT_CPU, PERCENT_MEM, USER, TIME, LAST_PROCESSFIELD } ProcessField; diff --git a/ProcessList.c b/ProcessList.c index 25d4482..93394fb 100644 --- a/ProcessList.c +++ b/ProcessList.c @@ -77,11 +77,6 @@ typedef struct ProcessList_ { long int usedSwap; long int freeSwap; - int kernelMajor; - int kernelMiddle; - int kernelMinor; - int kernelTiny; - ProcessField* fields; ProcessField sortKey; int direction; @@ -96,19 +91,6 @@ typedef struct ProcessList_ { } ProcessList; }*/ -/* private */ -void ProcessList_getKernelVersion(ProcessList* this) { - struct utsname uts; - (void) uname(&uts); - char** items = String_split(uts.release, '.'); - this->kernelMajor = atoi(items[0]); - this->kernelMiddle = atoi(items[1]); - this->kernelMinor = atoi(items[2]); - this->kernelTiny = items[3] ? atoi(items[3]) : 0; - for (int i = 0; items[i] != NULL; i++) free(items[i]); - free(items); -} - /* private property */ ProcessField defaultHeaders[LAST_PROCESSFIELD] = { PID, USER, PRIORITY, NICE, M_SIZE, M_RESIDENT, M_SHARE, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, LAST_PROCESSFIELD }; @@ -125,8 +107,6 @@ ProcessList* ProcessList_new(UsersTable* usersTable) { this->processes2 = TypedVector_new(PROCESS_CLASS, true, DEFAULT_SIZE); TypedVector_setCompareFunction(this->processes2, Process_compare); - ProcessList_getKernelVersion(this); - FILE* status = fopen(PROCSTATFILE, "r"); assert(status != NULL); char buffer[256]; @@ -562,25 +542,19 @@ void ProcessList_scan(ProcessList* this) { assert(status != NULL); for (int i = 0; i <= this->processorCount; i++) { int cpuid; - if (this->kernelMajor == 2 && this->kernelMiddle <= 4) { - if (i == 0) { - fscanf(status, "cpu %ld %ld %ld %ld\n", &usertime, &nicetime, &systemtime, &idletime); - } else { - fscanf(status, "cpu%d %ld %ld %ld %ld\n", &cpuid, &usertime, &nicetime, &systemtime, &idletime); - assert(cpuid == i - 1); - } - totaltime = usertime + nicetime + systemtime + idletime; - } else { - long int ioWait, irq, softIrq; - if (i == 0) - fscanf(status, "cpu %ld %ld %ld %ld %ld %ld %ld\n", &usertime, &nicetime, &systemtime, &idletime, &ioWait, &irq, &softIrq); - else { - fscanf(status, "cpu%d %ld %ld %ld %ld %ld %ld %ld\n", &cpuid, &usertime, &nicetime, &systemtime, &idletime, &ioWait, &irq, &softIrq); - assert(cpuid == i - 1); - } - systemtime += ioWait + irq + softIrq; - totaltime = usertime + nicetime + systemtime + idletime; + int fieldsread; + long int ioWait, irq, softIrq, steal; + ioWait = irq = softIrq = steal = 0; + if (i == 0) + fieldsread = fscanf(status, "cpu %ld %ld %ld %ld %ld %ld %ld\n", &usertime, &nicetime, &systemtime, &idletime, &ioWait, &irq, &softIrq, &steal); + else { + fieldsread = fscanf(status, "cpu%d %ld %ld %ld %ld %ld %ld %ld\n", &cpuid, &usertime, &nicetime, &systemtime, &idletime, &ioWait, &irq, &softIrq, &steal); + assert(cpuid == i - 1); } + // Fields existing on kernels >= 2.6 + // (and RHEL's patched kernel 2.4...) + systemtime += ioWait + irq + softIrq + steal; + totaltime = usertime + nicetime + systemtime + idletime; assert (usertime >= this->userTime[i]); assert (nicetime >= this->niceTime[i]); assert (systemtime >= this->systemTime[i]); @@ -2,7 +2,7 @@ htop by Hisham Muhammad <lode@gobolinux.org> -May-Aug, 2004. +May, 2004 - July, 2005 Introduction ~~~~~~~~~~~~ @@ -10,6 +10,10 @@ Introduction This is htop, an interactive process viewer for Linux. It requires ncurses. Tested with Linux 2.4 and 2.6. +Note that, currently, htop is _Linux_ specific -- it is based +on the Linux /proc filesystem. Contributions of ports to +other operating systems are welcome and will gladly be merged. + This software has evolved considerably during the last months, and is reasonably complete, but there is still room for improvement. Read the TODO file to see what's known to be missing. diff --git a/RichString.c b/RichString.c index 63db850..7a92e08 100644 --- a/RichString.c +++ b/RichString.c @@ -4,7 +4,6 @@ #include <stdlib.h> #include <string.h> #include <curses.h> -#include <sys/param.h> #include "debug.h" #include <assert.h> @@ -20,6 +19,10 @@ typedef struct RichString_ { }*/ +#ifndef MIN +#define MIN(a,b) ((a)<(b)?(a):(b)) +#endif + /* private property */ WINDOW* workArea = NULL; @@ -26,13 +26,20 @@ Settings* Settings_new(ProcessList* pl, Header* header) { Settings* this = malloc(sizeof(Settings)); this->pl = pl; this->header = header; - // TODO: how to get SYSCONFDIR correctly through Autoconf? - // char* systemSettings = String_cat(SYSCONFDIR, "/htoprc"); - // Settings_read(this, systemSettings); - char* home = getenv("HOME"); + char* home; + home = getenv("HOME_ETC"); + if (!home) home = getenv("HOME"); this->userSettings = String_cat(home, "/.htoprc"); - Settings_read(this, this->userSettings); - // free(systemSettings); + bool ok = Settings_read(this, this->userSettings); + if (!ok) { + // TODO: how to get SYSCONFDIR correctly through Autoconf? + char* systemSettings = String_cat(SYSCONFDIR, "/htoprc"); + ok = Settings_read(this, systemSettings); + free(systemSettings); + if (!ok) { + Header_defaultMeters(this->header); + } + } return this; } @@ -72,7 +79,6 @@ bool Settings_read(Settings* this, char* fileName) { FILE* fd; fd = fopen(fileName, "r"); if (fd == NULL) { - Header_defaultMeters(this->header); return false; } const int maxLine = 512; @@ -176,8 +182,10 @@ bool Settings_write(Settings* this) { fprintf(fd, "tree_view=%d\n", (int) this->pl->treeView); fprintf(fd, "header_margin=%d\n", (int) this->header->margin); fprintf(fd, "left_meters="); - for (int i = 0; i < Header_size(this->header, LEFT_HEADER); i++) + for (int i = 0; i < Header_size(this->header, LEFT_HEADER); i++) { +fprintf(stderr, "Field #%d\n", i); fprintf(fd, "%s ", Header_readMeterName(this->header, i, LEFT_HEADER)); + } fprintf(fd, "\n"); fprintf(fd, "left_meter_modes="); for (int i = 0; i < Header_size(this->header, LEFT_HEADER); i++) @@ -5,7 +5,7 @@ Released under the GNU GPL, see the COPYING file in the source distribution for its full text. */ -#include "Signal.h" +#include "SignalItem.h" #include "String.h" #include "Object.h" #include "RichString.h" diff --git a/SignalsListBox.c b/SignalsListBox.c index a087db0..e626994 100644 --- a/SignalsListBox.c +++ b/SignalsListBox.c @@ -1,7 +1,7 @@ #include "SignalsListBox.h" #include "ListBox.h" -#include "Signal.h" +#include "SignalItem.h" #include "RichString.h" #include "debug.h" diff --git a/SignalsListBox.h b/SignalsListBox.h index 6bcb3cd..af2fbf7 100644 --- a/SignalsListBox.h +++ b/SignalsListBox.h @@ -4,7 +4,7 @@ #define HEADER_SignalsListBox #include "ListBox.h" -#include "Signal.h" +#include "SignalItem.h" #include "RichString.h" #include "debug.h" diff --git a/UsersTable.c b/UsersTable.c index 381a741..2c9c34f 100644 --- a/UsersTable.c +++ b/UsersTable.c @@ -18,12 +18,6 @@ in the source distribution for its full text. #include <assert.h> /*{ -#ifndef SYSCONFDIR -#define SYSCONFDIR "/etc" -#endif -}*/ - -/*{ typedef struct UsersTable_ { Hashtable* users; } UsersTable; @@ -105,13 +105,13 @@ #define PACKAGE_NAME "htop" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "htop 0.5.2" +#define PACKAGE_STRING "htop 0.5.3" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "htop" /* Define to the version of this package. */ -#define PACKAGE_VERSION "0.5.2" +#define PACKAGE_VERSION "0.5.3" /* Define as the return type of signal handlers (`int' or `void'). */ #define RETSIGTYPE void @@ -120,7 +120,7 @@ #define STDC_HEADERS 1 /* Version number of package */ -#define VERSION "0.5.2" +#define VERSION "0.5.3" /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for htop 0.5.2. +# Generated by GNU Autoconf 2.59 for htop 0.5.3. # # Report bugs to <loderunner@users.sourceforge.net>. # @@ -269,8 +269,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='htop' PACKAGE_TARNAME='htop' -PACKAGE_VERSION='0.5.2' -PACKAGE_STRING='htop 0.5.2' +PACKAGE_VERSION='0.5.3' +PACKAGE_STRING='htop 0.5.3' PACKAGE_BUGREPORT='loderunner@users.sourceforge.net' ac_unique_file="htop.c" @@ -780,7 +780,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures htop 0.5.2 to adapt to many kinds of systems. +\`configure' configures htop 0.5.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -842,7 +842,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of htop 0.5.2:";; + short | recursive ) echo "Configuration of htop 0.5.3:";; esac cat <<\_ACEOF @@ -960,7 +960,7 @@ fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -htop configure 0.5.2 +htop configure 0.5.3 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. @@ -974,7 +974,7 @@ cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by htop $as_me 0.5.2, which was +It was created by htop $as_me 0.5.3, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -1617,7 +1617,7 @@ fi # Define the identity of the package. PACKAGE='htop' - VERSION='0.5.2' + VERSION='0.5.3' cat >>confdefs.h <<_ACEOF @@ -5200,6 +5200,57 @@ fi done +echo "$as_me:$LINENO: checking for /proc/stat" >&5 +echo $ECHO_N "checking for /proc/stat... $ECHO_C" >&6 +if test "${ac_cv_file__proc_stat+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + test "$cross_compiling" = yes && + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { (exit 1); exit 1; }; } +if test -r "/proc/stat"; then + ac_cv_file__proc_stat=yes +else + ac_cv_file__proc_stat=no +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_file__proc_stat" >&5 +echo "${ECHO_T}$ac_cv_file__proc_stat" >&6 +if test $ac_cv_file__proc_stat = yes; then + : +else + { { echo "$as_me:$LINENO: error: Cannot find /proc/stat. Make sure you have a Linux-compatible /proc filesystem mounted. See the file README for help." >&5 +echo "$as_me: error: Cannot find /proc/stat. Make sure you have a Linux-compatible /proc filesystem mounted. See the file README for help." >&2;} + { (exit 1); exit 1; }; } +fi + +echo "$as_me:$LINENO: checking for /proc/meminfo" >&5 +echo $ECHO_N "checking for /proc/meminfo... $ECHO_C" >&6 +if test "${ac_cv_file__proc_meminfo+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + test "$cross_compiling" = yes && + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { (exit 1); exit 1; }; } +if test -r "/proc/meminfo"; then + ac_cv_file__proc_meminfo=yes +else + ac_cv_file__proc_meminfo=no +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_file__proc_meminfo" >&5 +echo "${ECHO_T}$ac_cv_file__proc_meminfo" >&6 +if test $ac_cv_file__proc_meminfo = yes; then + : +else + { { echo "$as_me:$LINENO: error: Cannot find /proc/meminfo. Make sure you have a Linux-compatible /proc filesystem mounted. See the file README for help." >&5 +echo "$as_me: error: Cannot find /proc/meminfo. Make sure you have a Linux-compatible /proc filesystem mounted. See the file README for help." >&2;} + { (exit 1); exit 1; }; } +fi + + ac_config_files="$ac_config_files Makefile" cat >confcache <<\_ACEOF @@ -5578,7 +5629,7 @@ _ASBOX } >&5 cat >&5 <<_CSEOF -This file was extended by htop $as_me 0.5.2, which was +This file was extended by htop $as_me 0.5.3, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -5641,7 +5692,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -htop config.status 0.5.2 +htop config.status 0.5.3 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" diff --git a/configure.ac b/configure.ac index 9474a47..66f58ea 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.57) -AC_INIT([htop],[0.5.2],[loderunner@users.sourceforge.net]) +AC_INIT([htop],[0.5.3],[loderunner@users.sourceforge.net]) AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR([htop.c]) AC_CONFIG_HEADER([config.h]) @@ -33,5 +33,8 @@ AC_TYPE_SIGNAL AC_FUNC_STAT AC_CHECK_FUNCS([memmove strncasecmp strstr strdup]) +AC_CHECK_FILE(/proc/stat,,AC_MSG_ERROR(Cannot find /proc/stat. Make sure you have a Linux-compatible /proc filesystem mounted. See the file README for help.)) +AC_CHECK_FILE(/proc/meminfo,,AC_MSG_ERROR(Cannot find /proc/meminfo. Make sure you have a Linux-compatible /proc filesystem mounted. See the file README for help.)) + AC_CONFIG_FILES([Makefile]) AC_OUTPUT @@ -9,7 +9,7 @@ in the source distribution for its full text. #include "CRT.h" #include "ListBox.h" #include "UsersTable.h" -#include "Signal.h" +#include "SignalItem.h" #include "RichString.h" #include "Settings.h" #include "ScreenManager.h" @@ -13,7 +13,7 @@ in the source distribution for its full text. #include "CRT.h" #include "ListBox.h" #include "UsersTable.h" -#include "Signal.h" +#include "SignalItem.h" #include "RichString.h" #include "Settings.h" #include "ScreenManager.h" |