fwd.[ch]: Expose the program status flags globally.
authorMark Wooding <mdw@distorted.org.uk>
Fri, 5 Feb 2016 01:16:04 +0000 (01:16 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 5 Feb 2016 01:16:04 +0000 (01:16 +0000)
fwd.c
fwd.h

diff --git a/fwd.c b/fwd.c
index d086ed3..0455bc4 100644 (file)
--- a/fwd.c
+++ b/fwd.c
@@ -29,6 +29,7 @@
 /*----- Global variables --------------------------------------------------*/
 
 sel_state *sel;                                /* Multiplexor for nonblocking I/O */
 /*----- Global variables --------------------------------------------------*/
 
 sel_state *sel;                                /* Multiplexor for nonblocking I/O */
+unsigned flags = 0;                    /* Global state flags */
 
 /*----- Static variables --------------------------------------------------*/
 
 
 /*----- Static variables --------------------------------------------------*/
 
@@ -37,14 +38,9 @@ typedef struct conffile {
   char *name;
 } conffile;
 
   char *name;
 } conffile;
 
-static unsigned flags = 0;             /* Global state flags */
 static unsigned active = 0;            /* Number of active things */
 static conffile *conffiles = 0;                /* List of configuration files */
 
 static unsigned active = 0;            /* Number of active things */
 static conffile *conffiles = 0;                /* List of configuration files */
 
-#define FW_SYSLOG 1u
-#define FW_QUIET 2u
-#define FW_SET 4u
-
 /*----- Configuration parsing ---------------------------------------------*/
 
 /* --- @parse@ --- *
 /*----- Configuration parsing ---------------------------------------------*/
 
 /* --- @parse@ --- *
diff --git a/fwd.h b/fwd.h
index a900e31..f10af74 100644 (file)
--- a/fwd.h
+++ b/fwd.h
 
 extern sel_state *sel;
 
 
 extern sel_state *sel;
 
+/* --- Global state flags --- */
+
+extern unsigned flags;
+
+#define FW_SYSLOG 1u
+#define FW_QUIET 2u
+#define FW_SET 4u
+
 /* --- Help text --- */
 
 extern const char grammar_text[];
 /* --- Help text --- */
 
 extern const char grammar_text[];