summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--boolean.h4
-rw-r--r--color.h5
-rw-r--r--commands.h5
-rw-r--r--help.h5
-rw-r--r--layout.h4
-rw-r--r--loadavg.h5
-rw-r--r--message.h7
-rw-r--r--os.h5
-rw-r--r--screen.h5
-rw-r--r--username.h5
-rw-r--r--utils.h5
-rw-r--r--version.h5
12 files changed, 58 insertions, 2 deletions
diff --git a/boolean.h b/boolean.h
index c6bcf4d..9c4367b 100644
--- a/boolean.h
+++ b/boolean.h
@@ -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_ */
diff --git a/color.h b/color.h
index 91a7675..5d4d8bc 100644
--- a/color.h
+++ b/color.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_ */
diff --git a/commands.h b/commands.h
index 168929d..33f618f 100644
--- a/commands.h
+++ b/commands.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_ */
diff --git a/help.h b/help.h
index be3e5ca..d46b6ac 100644
--- a/help.h
+++ b/help.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_ */
diff --git a/layout.h b/layout.h
index f1122c4..8a40b06 100644
--- a/layout.h
+++ b/layout.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_ */
diff --git a/loadavg.h b/loadavg.h
index f49541e..070dc14 100644
--- a/loadavg.h
+++ b/loadavg.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_ */
diff --git a/message.h b/message.h
index 6cce794..e24b62c 100644
--- a/message.h
+++ b/message.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_ */
diff --git a/os.h b/os.h
index 2ca7046..8999bc8 100644
--- a/os.h
+++ b/os.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_ */
diff --git a/screen.h b/screen.h
index e7675fc..d9e917c 100644
--- a/screen.h
+++ b/screen.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_ */
diff --git a/username.h b/username.h
index 5220b1c..5062ec7 100644
--- a/username.h
+++ b/username.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_ */
diff --git a/utils.h b/utils.h
index 609d72c..30fe13f 100644
--- a/utils.h
+++ b/utils.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_ */
diff --git a/version.h b/version.h
index 1f88cd4..5a426e6 100644
--- a/version.h
+++ b/version.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_ */