summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-10-07 17:47:36 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-10-07 17:47:36 -0700
commit97ae52f80f9e382917889bde1913367572e89012 (patch)
treeefb6c32d06c1e30b12c503ebba22e33aa60d4b4d
parent3602fb0b7ba2bde9c73610693dbb50534fe42b81 (diff)
Move extern variable declarations to common header (def.h)
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--def.h17
-rw-r--r--include.c8
-rw-r--r--parse.c7
-rw-r--r--pr.c9
4 files changed, 17 insertions, 24 deletions
diff --git a/def.h b/def.h
index 5683c1e..6251d91 100644
--- a/def.h
+++ b/def.h
@@ -176,3 +176,20 @@ int cppsetup(const char *filename,
extern void fatalerr(const char *, ...) _X_ATTRIBUTE_PRINTF(1, 2);
extern void warning(const char *, ...) _X_ATTRIBUTE_PRINTF(1, 2);
extern void warning1(const char *, ...) _X_ATTRIBUTE_PRINTF(1, 2);
+
+extern struct inclist inclist[ MAXFILES ];
+extern struct inclist *inclistp;
+extern struct inclist *inclistnext;
+extern struct inclist maininclist;
+extern const char *includedirs[ ];
+extern const char **includedirsnext;
+extern const char * const directives[];
+extern char *notdotdot[ ];
+
+extern char *objprefix;
+extern char *objsuffix;
+extern int width;
+extern boolean printed;
+extern boolean verbose;
+extern boolean show_where_not;
+extern boolean warn_multiple;
diff --git a/include.c b/include.c
index d3fa064..ebbdacf 100644
--- a/include.c
+++ b/include.c
@@ -27,14 +27,6 @@ in this Software without prior written authorization from The Open Group.
#include "def.h"
-extern struct inclist inclist[ MAXFILES ],
- *inclistp, *inclistnext;
-extern const char *includedirs[ ],
- **includedirsnext;
-extern char *notdotdot[ ];
-extern boolean show_where_not;
-extern boolean warn_multiple;
-
static boolean
isdot(const char *p)
{
diff --git a/parse.c b/parse.c
index 65317e2..a4277e7 100644
--- a/parse.c
+++ b/parse.c
@@ -26,13 +26,6 @@ in this Software without prior written authorization from The Open Group.
#include "def.h"
-extern const char * const directives[];
-extern struct inclist inclist[ MAXFILES ],
- *inclistnext,
- maininclist;
-extern const char *includedirs[ ],
- **includedirsnext;
-
static int deftype (char *line, struct filepointer *filep,
struct inclist *file_red, struct inclist *file,
int parse_it);
diff --git a/pr.c b/pr.c
index 9a65723..9c39a16 100644
--- a/pr.c
+++ b/pr.c
@@ -26,15 +26,6 @@ in this Software without prior written authorization from The Open Group.
#include "def.h"
-extern struct inclist inclist[ MAXFILES ],
- *inclistp;
-extern char *objprefix;
-extern char *objsuffix;
-extern int width;
-extern boolean printed;
-extern boolean verbose;
-extern boolean show_where_not;
-
void
add_include(struct filepointer *filep, struct inclist *file,
struct inclist *file_red, const char *include, int type,