From c749bfbd0c11f5a81df5a6e35cf1d30a0f5db6c2 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Sun, 9 May 2004 22:14:16 +0000 Subject: spaces --- usr.bin/top/commands.c | 4 ++-- usr.bin/top/machine.c | 8 ++++---- usr.bin/top/machine.h | 4 ++-- usr.bin/top/screen.c | 10 ++++----- usr.bin/top/sigconv.awk | 8 ++++---- usr.bin/top/top.c | 54 ++++++++++++++++++++++++------------------------- usr.bin/top/username.c | 6 +++--- 7 files changed, 47 insertions(+), 47 deletions(-) (limited to 'usr.bin') diff --git a/usr.bin/top/commands.c b/usr.bin/top/commands.c index 7a802c40364..67d1a10efac 100644 --- a/usr.bin/top/commands.c +++ b/usr.bin/top/commands.c @@ -1,4 +1,4 @@ -/* $OpenBSD: commands.c,v 1.13 2003/09/19 10:32:24 jmc Exp $ */ +/* $OpenBSD: commands.c,v 1.14 2004/05/09 22:14:15 deraadt Exp $ */ /* * Top users/processes display for Unix @@ -121,7 +121,7 @@ next_field(char *str) return (*str == '\0' ? NULL : str); } -static int +static int scanint(char *str, int *intp) { int val = 0; diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c index ade7b75747e..82c8f5f8922 100644 --- a/usr.bin/top/machine.c +++ b/usr.bin/top/machine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machine.c,v 1.37 2004/01/08 18:15:06 millert Exp $ */ +/* $OpenBSD: machine.c,v 1.38 2004/05/09 22:14:15 deraadt Exp $ */ /*- * Copyright (c) 1994 Thorsten Lockert @@ -59,13 +59,13 @@ #include "utils.h" #include "loadavg.h" -static int swapmode(int *, int *); +static int swapmode(int *, int *); /* get_process_info passes back a handle. This is what it looks like: */ struct handle { struct kinfo_proc2 **next_proc; /* points to next valid proc pointer */ - int remaining; /* number of pointers remaining */ + int remaining; /* number of pointers remaining */ }; /* what we consider to be process size: */ @@ -74,7 +74,7 @@ struct handle { /* * These definitions control the format of the per-process area */ -static char header[] = +static char header[] = " PID X PRI NICE SIZE RES STATE WAIT TIME CPU COMMAND"; /* 0123456 -- field to fill in starts at header+6 */ diff --git a/usr.bin/top/machine.h b/usr.bin/top/machine.h index f360d89471f..fb191daf30d 100644 --- a/usr.bin/top/machine.h +++ b/usr.bin/top/machine.h @@ -1,4 +1,4 @@ -/* $OpenBSD: machine.h,v 1.9 2003/07/07 21:36:52 deraadt Exp $ */ +/* $OpenBSD: machine.h,v 1.10 2004/05/09 22:14:15 deraadt Exp $ */ /* * Top users/processes display for Unix @@ -83,7 +83,7 @@ extern int display_init(struct statics *); extern int machine_init(struct statics *); extern char *format_header(char *); extern void get_system_info(struct system_info *); -extern caddr_t +extern caddr_t get_process_info(struct system_info *, struct process_select *, int (*) (const void *, const void *)); extern char *format_next_process(caddr_t, char *(*)(uid_t)); diff --git a/usr.bin/top/screen.c b/usr.bin/top/screen.c index d1947428b42..eaed1dd22ac 100644 --- a/usr.bin/top/screen.c +++ b/usr.bin/top/screen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: screen.c,v 1.13 2003/06/16 17:24:44 millert Exp $ */ +/* $OpenBSD: screen.c,v 1.14 2004/05/09 22:14:15 deraadt Exp $ */ /* * Top users/processes display for Unix @@ -30,9 +30,9 @@ /* * This file contains the routines that interface to termcap and stty/gtty. - * + * * Paul Vixie, February 1987: converted to use ioctl() instead of stty/gtty. - * + * * I put in code to turn on the TOSTOP bit while top was running, but I didn't * really like the results. If you desire it, turn on the preprocessor * variable "TOStop". --wnl @@ -251,8 +251,8 @@ standout(char *msg) } } -void -clear() +void +clear(void) { if (smart_terminal) putcap(clear_scr); diff --git a/usr.bin/top/sigconv.awk b/usr.bin/top/sigconv.awk index 479bc05545a..d7af5853a24 100644 --- a/usr.bin/top/sigconv.awk +++ b/usr.bin/top/sigconv.awk @@ -29,8 +29,8 @@ BEGIN { nsig = 0; j = 0; print "/* This file was automatically generated */" - print "/* by the awk script \"sigconv.awk\". */" - print "/* $OpenBSD: sigconv.awk,v 1.4 2003/06/18 08:42:31 deraadt Exp $ */\n" + print "/* by the awk script \"sigconv.awk\". */" + print "/* $OpenBSD: sigconv.awk,v 1.5 2004/05/09 22:14:15 deraadt Exp $ */\n" print "struct sigdesc {" print " char *name;" print " int number;" @@ -42,7 +42,7 @@ BEGIN { j = sprintf("%d", $3); str = $2; - if (nsig < j) + if (nsig < j) nsig = j; siglist[j] = sprintf("\"%s\",\t%2d", substr(str, 4), j); } @@ -67,7 +67,7 @@ BEGIN { } END { - for (n = 1; n <= nsig; n++) + for (n = 1; n <= nsig; n++) if (siglist[n] != "") printf(" { %s },\n", siglist[n]); diff --git a/usr.bin/top/top.c b/usr.bin/top/top.c index 51e44a00dea..e6c5f073770 100644 --- a/usr.bin/top/top.c +++ b/usr.bin/top/top.c @@ -1,4 +1,4 @@ -/* $OpenBSD: top.c,v 1.31 2004/05/07 19:19:49 millert Exp $ */ +/* $OpenBSD: top.c,v 1.32 2004/05/09 22:14:15 deraadt Exp $ */ /* * Top users/processes display for Unix @@ -28,7 +28,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -const char copyright[] = "Copyright (c) 1984 through 1996, William LeFebvre"; +const char copyright[] = "Copyright (c) 1984 through 1996, William LeFebvre"; #include #include @@ -55,34 +55,34 @@ const char copyright[] = "Copyright (c) 1984 through 1996, William LeFebvre #define BUFFERSIZE 2048 /* The buffer that stdio will use */ -char stdoutbuf[BUFFERSIZE]; +char stdoutbuf[BUFFERSIZE]; -extern int overstrike; +extern int overstrike; /* signal handling routines */ -static void leave(int); -static void onalrm(int); -static void tstop(int); -static void winch(int); +static void leave(int); +static void onalrm(int); +static void tstop(int); +static void winch(int); volatile sig_atomic_t leaveflag, tstopflag, winchflag; -static void reset_display(void); +static void reset_display(void); int rundisplay(void); -static int max_topn; /* maximum displayable processes */ +static int max_topn; /* maximum displayable processes */ -extern int (*proc_compares[])(const void *, const void *); +extern int (*proc_compares[])(const void *, const void *); int order_index; /* pointers to display routines */ -void (*d_loadave) (int, double *) = i_loadave; -void (*d_procstates) (int, int *) = i_procstates; -void (*d_cpustates) (int *) = i_cpustates; -void (*d_memory) (int *) = i_memory; -void (*d_message) (void) = i_message; -void (*d_header) (char *) = i_header; -void (*d_process) (int, char *) = i_process; +void (*d_loadave)(int, double *) = i_loadave; +void (*d_procstates)(int, int *) = i_procstates; +void (*d_cpustates)(int *) = i_cpustates; +void (*d_memory)(int *) = i_memory; +void (*d_message)(void) = i_message; +void (*d_header)(char *) = i_header; +void (*d_process)(int, char *) = i_process; int displays = 0; /* indicates unspecified */ char do_unames = Yes; @@ -116,11 +116,11 @@ char topn_specified = No; #define CMD_displays 9 #define CMD_kill 10 #define CMD_renice 11 -#define CMD_idletog 12 -#define CMD_idletog2 13 +#define CMD_idletog 12 +#define CMD_idletog2 13 #define CMD_user 14 #define CMD_system 15 -#define CMD_order 16 +#define CMD_order 16 static void usage(void) @@ -172,7 +172,7 @@ parseargs(int ac, char **av) if ((i = atoiwi(optarg)) != Invalid && i != 0) { displays = i; break; - } + } warnx("warning: display count should be positive " "-- option ignored"); warnings++; @@ -370,7 +370,7 @@ main(int argc, char *argv[]) if (warnings) { fputs("....", stderr); fflush(stderr); /* why must I do this? */ - sleep((unsigned) (3 * warnings)); + sleep((unsigned)(3 * warnings)); fputc('\n', stderr); } restart: @@ -400,7 +400,7 @@ restart: /* display the cpu state percentage breakdown */ if (dostates) { /* but not the first time */ - (*d_cpustates) (system_info.cpustates); + (*d_cpustates)(system_info.cpustates); } else { /* we'll do it next time */ if (smart_terminal) @@ -413,13 +413,13 @@ restart: } /* display memory stats */ - (*d_memory) (system_info.memory); + (*d_memory)(system_info.memory); /* handle message area */ - (*d_message) (); + (*d_message)(); /* update the header area */ - (*d_header) (header_text); + (*d_header)(header_text); if (topn > 0) { /* determine number of processes to actually display */ diff --git a/usr.bin/top/username.c b/usr.bin/top/username.c index 2d5cc0f3745..851e4e87099 100644 --- a/usr.bin/top/username.c +++ b/usr.bin/top/username.c @@ -1,4 +1,4 @@ -/* $OpenBSD: username.c,v 1.13 2003/07/07 21:36:52 deraadt Exp $ */ +/* $OpenBSD: username.c,v 1.14 2004/05/09 22:14:15 deraadt Exp $ */ /* * Top users/processes display for Unix @@ -61,8 +61,8 @@ struct hash_el { char name[_PW_NAME_LEN + 1]; }; -static int enter_user(uid_t, char *, int); -static int get_user(uid_t); +static int enter_user(uid_t, char *, int); +static int get_user(uid_t); #define is_empty_hash(x) (hash_table[x].name[0] == 0) -- cgit v1.2.3