diff options
-rw-r--r-- | boolean.h | 4 | ||||
-rw-r--r-- | color.h | 5 | ||||
-rw-r--r-- | commands.h | 5 | ||||
-rw-r--r-- | help.h | 5 | ||||
-rw-r--r-- | layout.h | 4 | ||||
-rw-r--r-- | loadavg.h | 5 | ||||
-rw-r--r-- | message.h | 7 | ||||
-rw-r--r-- | os.h | 5 | ||||
-rw-r--r-- | screen.h | 5 | ||||
-rw-r--r-- | username.h | 5 | ||||
-rw-r--r-- | utils.h | 5 | ||||
-rw-r--r-- | version.h | 5 |
12 files changed, 58 insertions, 2 deletions
@@ -1,5 +1,9 @@ +#ifndef _BOOLEAN_H_ +#define _BOOLEAN_H_ + /* My favorite names for boolean values */ #define No 0 #define Yes 1 #define Maybe 2 /* tri-state boolean, actually */ +#endif /* _BOOLEAN_H_ */ @@ -4,6 +4,9 @@ * Definition of the color interface. */ +#ifndef _COLOR_H_ +#define _COLOR_H_ + int color_env_parse(char *env); int color_tag(char *tag); int color_test(int tagidx, int value); @@ -49,3 +52,5 @@ void color_dump(FILE *f); * 46 Cyan * 47 White */ + +#endif /* _COLOR_H_ */ @@ -1,5 +1,8 @@ /* call specifications for commands.c */ +#ifndef _COMMANDS_H_ +#define _COMMANDS_H_ + void show_help(struct statics *); int scanint(char *str, int *intp); int error_count(); @@ -9,3 +12,5 @@ char *renice_procs(char *str); void show_current_query(char *, int); void show_explain(char *, int); void show_locks(char *, int); + +#endif /* _COMMANDS_H_ */ @@ -1,5 +1,8 @@ /* Simple help text displayed by "show_help" */ +#ifndef _HELP_H_ +#define _HELP_H_ + char *help_text = "\n\ A top users display for Unix\n\ \n\ @@ -30,3 +33,5 @@ u - display processes for only one user (+ selects all users)\n\ \n\ Not all commands are available on all systems.\n\ "; + +#endif /* _HELP_H_ */ @@ -6,6 +6,9 @@ * for cursor addressing. */ +#ifndef _LAYOUT_H_ +#define _LAYOUT_H_ + #define X_LASTPID 10 #define Y_LASTPID 0 #define X_LASTPIDWIDTH 13 @@ -33,3 +36,4 @@ #define Y_IDLECURSOR 4 #define Y_PROCS 6 +#endif /* _LAYOUT_H_ */ @@ -12,6 +12,9 @@ * intload(i) - convert integer to load_avg. */ +#ifndef _LOADAVG_H_ +#define _LOADAVG_H_ + /* * We assume that if FSCALE is defined, then avenrun and ccpu are type long. * If your machine is an exception (mips, perhaps?) then make adjustments @@ -55,3 +58,5 @@ typedef double pctcpu; # define loaddouble(la) (la) # define intload(i) ((double)(i)) #endif + +#endif /* _LOADAVG_H_ */ @@ -3,8 +3,11 @@ just contains the calls for displaying messages. Do not include this and display.h at the same time. */ -#ifndef _MESSAGE_H +#ifndef _MESSAGE_H_ +#define _MESSAGE_H_ + void new_message(int type, char *msgfmt, ...); void error_message(char *msgfmt, ...); void clear_message(); -#endif + +#endif /* _MESSAGE_H_ */ @@ -1,3 +1,6 @@ +#ifndef _OS_H_ +#define _OS_H_ + #include "config.h" #include <sys/types.h> @@ -57,3 +60,5 @@ caddr_t malloc(); #if defined (__sun) && defined (__SVR4) #include <unistd.h> #endif + +#endif /* _OS_H_ */ @@ -5,6 +5,9 @@ * screen package in "screen.c" */ +#ifndef _SCREEN_H_ +#define _SCREEN_H_ + /* includes for termcap */ #ifdef HAVE_TERMCAP_H #include <termcap.h> @@ -45,3 +48,5 @@ void standout(char *msg); void clear(); int clear_eol(int len); void go_home(); + +#endif /* _SCREEN_H_ */ @@ -1,5 +1,10 @@ /* interface for username.c */ +#ifndef _USERNAME_H_ +#define _USERNAME_H_ + void init_hash(); char *username(int uid); int userid(char *username); + +#endif /* _USERNAME_H_ */ @@ -9,6 +9,9 @@ * Copyright (c) 1989, 1990, 1992, William LeFebvre, Northwestern University */ +#ifndef _UTILS_H_ +#define _UTILS_H_ + /* prototypes for functions found in utils.c */ int atoiwi(char *); @@ -33,3 +36,5 @@ void xdprintf(char *fmt, ...); #else #define dprintf if (0) #endif + +#endif /* _UTILS_H_ */ @@ -9,4 +9,9 @@ * Copyright (c) 1989, 1990, 1992, William LeFebvre, Northwestern University */ +#ifndef _VERSION_H_ +#define _VERSION_H_ + char *version_string(); + +#endif /* _VERSION_H_ */ |