summaryrefslogtreecommitdiffstats
path: root/usr.bin/finger
diff options
context:
space:
mode:
authorjmallett <jmallett@FreeBSD.org>2004-03-14 06:43:34 +0000
committerjmallett <jmallett@FreeBSD.org>2004-03-14 06:43:34 +0000
commitf12ed405d13a8799736ce8347eb2442e49fa7fd8 (patch)
treef2c3eca9aa1949ec61715776f1adb7a0ecc62535 /usr.bin/finger
parent36be86fb0ab127fdca2afe0978f4d07102f731e0 (diff)
downloadFreeBSD-src-f12ed405d13a8799736ce8347eb2442e49fa7fd8.zip
FreeBSD-src-f12ed405d13a8799736ce8347eb2442e49fa7fd8.tar.gz
Add multiple inclusion guards. Mostly this is for extern.h, which was
included twice by lprint.c, which included both finger.h and extern.h. finger.h, in turn, includes extern.h. The redundant include of extern.h was removed from lprint.c, as part of this change, but the include guards were added anyway out of spite.
Diffstat (limited to 'usr.bin/finger')
-rw-r--r--usr.bin/finger/extern.h5
-rw-r--r--usr.bin/finger/finger.h5
-rw-r--r--usr.bin/finger/lprint.c1
3 files changed, 10 insertions, 1 deletions
diff --git a/usr.bin/finger/extern.h b/usr.bin/finger/extern.h
index c8ff7f0..3855209 100644
--- a/usr.bin/finger/extern.h
+++ b/usr.bin/finger/extern.h
@@ -34,6 +34,9 @@
* $FreeBSD$
*/
+#ifndef _EXTERN_H_
+#define _EXTERN_H_
+
extern char tbuf[1024]; /* Temp buffer for anybody. */
extern int entries; /* Number of people. */
extern DB *db; /* Database. */
@@ -58,3 +61,5 @@ PERSON *palloc(void);
char *prphone(char *);
void sflag_print(void);
int show_text(const char *, const char *, const char *);
+
+#endif /* !_EXTERN_H_ */
diff --git a/usr.bin/finger/finger.h b/usr.bin/finger/finger.h
index 7d4d99f..6b18146 100644
--- a/usr.bin/finger/finger.h
+++ b/usr.bin/finger/finger.h
@@ -37,6 +37,9 @@
* $FreeBSD$
*/
+#ifndef _FINGER_H_
+#define _FINGER_H_
+
typedef struct person {
uid_t uid; /* user id */
char *dir; /* user's home directory */
@@ -69,3 +72,5 @@ typedef struct where {
#define TIME_LIMIT 360 /* Do not keep listinging forever */
#include "extern.h"
+
+#endif /* !_FINGER_H_ */
diff --git a/usr.bin/finger/lprint.c b/usr.bin/finger/lprint.c
index d74b21e..848bbee 100644
--- a/usr.bin/finger/lprint.c
+++ b/usr.bin/finger/lprint.c
@@ -60,7 +60,6 @@ __FBSDID("$FreeBSD$");
#include <utmp.h>
#include "finger.h"
#include "pathnames.h"
-#include "extern.h"
#define LINE_LEN 80
#define TAB_LEN 8 /* 8 spaces between tabs */
OpenPOWER on IntegriCloud