summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/top/machine.c8
-rw-r--r--usr.bin/top/utils.c16
-rw-r--r--usr.bin/top/utils.h4
3 files changed, 14 insertions, 14 deletions
diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c
index dcdd40a64c0..a4279b29b6d 100644
--- a/usr.bin/top/machine.c
+++ b/usr.bin/top/machine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machine.c,v 1.12 1998/09/20 05:58:54 niklas Exp $ */
+/* $OpenBSD: machine.c,v 1.13 1998/09/20 06:19:14 niklas Exp $ */
/*
* top - a top users display for Unix
@@ -143,9 +143,9 @@ static int hz;
static unsigned long cp_time_offset;
/* these are for calculating cpu state percentages */
-static int cp_time[CPUSTATES];
-static int cp_old[CPUSTATES];
-static int cp_diff[CPUSTATES];
+static long cp_time[CPUSTATES];
+static long cp_old[CPUSTATES];
+static long cp_diff[CPUSTATES];
/* these are for detailing the process states */
diff --git a/usr.bin/top/utils.c b/usr.bin/top/utils.c
index bcb110532c4..1782376f6a6 100644
--- a/usr.bin/top/utils.c
+++ b/usr.bin/top/utils.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: utils.c,v 1.2 1997/08/22 07:16:31 downsj Exp $ */
+/* $OpenBSD: utils.c,v 1.3 1998/09/20 06:19:14 niklas Exp $ */
/*
* Top users/processes display for Unix
@@ -276,16 +276,16 @@ int percentages(cnt, out, new, old, diffs)
int cnt;
int *out;
-register int *new;
-register int *old;
-int *diffs;
+register long *new;
+register long *old;
+long *diffs;
{
register int i;
- register int change;
- register int total_change;
- register int *dp;
- int half_total;
+ register long change;
+ register long total_change;
+ register long *dp;
+ long half_total;
/* initialization */
total_change = 0;
diff --git a/usr.bin/top/utils.h b/usr.bin/top/utils.h
index fc0ab27d122..0ca824cad6b 100644
--- a/usr.bin/top/utils.h
+++ b/usr.bin/top/utils.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: utils.h,v 1.2 1997/08/22 07:16:32 downsj Exp $ */
+/* $OpenBSD: utils.h,v 1.3 1998/09/20 06:19:14 niklas Exp $ */
/*
* Top users/processes display for Unix
@@ -20,6 +20,6 @@ int digits __P((int));
char *strecpy __P((char *, char *));
int string_index __P((char *, char **));
char **argparse __P((char *, int *));
-int percentages __P((int, int *, int *, int *, int *));
+int percentages __P((int, int *, long *, long *, long *));
char *format_time __P((time_t));
char *format_k __P((int));