Move static structures from .h to .c, include .h in .l.
authorPeter Johnson <peter@tortall.net>
Wed, 13 Mar 2002 04:53:47 +0000 (04:53 -0000)
committerPeter Johnson <peter@tortall.net>
Wed, 13 Mar 2002 04:53:47 +0000 (04:53 -0000)
svn path=/trunk/yasm/; revision=492

modules/preprocs/yapp/yapp-preproc.c
modules/preprocs/yapp/yapp-preproc.h
modules/preprocs/yapp/yapp-token.l
src/preprocs/yapp/yapp-preproc.c
src/preprocs/yapp/yapp-preproc.h
src/preprocs/yapp/yapp-token.l

index e3c86f68230c273eee23c29fbe3a86bc7ee6de5a..323b2a5c4d316673e6c0b6caf4e179de344969e7 100644 (file)
@@ -41,7 +41,21 @@ YAPP_Output current_output;
 YYSTYPE yapp_preproc_lval;
 
 int isatty(int);
-void yapp_lex_initialize(FILE *f);
+
+/* Build source and macro representations */
+static SLIST_HEAD(source_head, source_s) source_head, macro_head, param_head, *current_head;
+static struct source_s {
+    SLIST_ENTRY(source_s) next;
+    YAPP_Token token;
+} *src, *source_tail, *macro_tail, *param_tail, **current_tail;
+typedef struct source_s source;
+
+/* don't forget what the nesting level says */
+static SLIST_HEAD(output_head, output_s) output_head;
+static struct output_s {
+    SLIST_ENTRY(output_s) next;
+    YAPP_Output out;
+} output, *out;
 
 /*****************************************************************************/
 /* macro support - to be moved to a separate file later (?)                  */
index 6458453ec7f24c5e685c296da23d6e4b770492d9..33ffd68123f410cb1a10d06851f38f69bf3a03a8 100644 (file)
@@ -32,14 +32,6 @@ typedef struct YAPP_Token_s {
     } val;
 } YAPP_Token;
 
-/* Build source and macro representations */
-static SLIST_HEAD(source_head, source_s) source_head, macro_head, param_head, *current_head;
-static struct source_s {
-    SLIST_ENTRY(source_s) next;
-    YAPP_Token token;
-} *src, *source_tail, *macro_tail, *param_tail, **current_tail;
-typedef struct source_s source;
-
 /* internal state of preprocessor's parser */
 typedef enum {
     YAPP_STATE_INITIAL = 0,
@@ -58,9 +50,4 @@ typedef enum {
     YAPP_BLOCKED_OUTPUT /* the surrounding level is not outputting */
 } YAPP_Output;
 
-/* don't forget what the nesting level says */
-static SLIST_HEAD(output_head, output_s) output_head;
-static struct output_s {
-    SLIST_ENTRY(output_s) next;
-    YAPP_Output out;
-} output, *out;
+void yapp_lex_initialize(FILE *f);
index 9218a80dec1e078bce7a9a81f6136e9f1e91e7f3..636a7f2497a0888a21d2fe21d372a61d27e7c692 100644 (file)
@@ -29,6 +29,7 @@
 
 #include "bytecode.h"
 
+#include "src/preprocs/yapp/yapp-preproc.h"
 #include "src/preprocs/yapp/yapp-token.h"
 
 
index e3c86f68230c273eee23c29fbe3a86bc7ee6de5a..323b2a5c4d316673e6c0b6caf4e179de344969e7 100644 (file)
@@ -41,7 +41,21 @@ YAPP_Output current_output;
 YYSTYPE yapp_preproc_lval;
 
 int isatty(int);
-void yapp_lex_initialize(FILE *f);
+
+/* Build source and macro representations */
+static SLIST_HEAD(source_head, source_s) source_head, macro_head, param_head, *current_head;
+static struct source_s {
+    SLIST_ENTRY(source_s) next;
+    YAPP_Token token;
+} *src, *source_tail, *macro_tail, *param_tail, **current_tail;
+typedef struct source_s source;
+
+/* don't forget what the nesting level says */
+static SLIST_HEAD(output_head, output_s) output_head;
+static struct output_s {
+    SLIST_ENTRY(output_s) next;
+    YAPP_Output out;
+} output, *out;
 
 /*****************************************************************************/
 /* macro support - to be moved to a separate file later (?)                  */
index 6458453ec7f24c5e685c296da23d6e4b770492d9..33ffd68123f410cb1a10d06851f38f69bf3a03a8 100644 (file)
@@ -32,14 +32,6 @@ typedef struct YAPP_Token_s {
     } val;
 } YAPP_Token;
 
-/* Build source and macro representations */
-static SLIST_HEAD(source_head, source_s) source_head, macro_head, param_head, *current_head;
-static struct source_s {
-    SLIST_ENTRY(source_s) next;
-    YAPP_Token token;
-} *src, *source_tail, *macro_tail, *param_tail, **current_tail;
-typedef struct source_s source;
-
 /* internal state of preprocessor's parser */
 typedef enum {
     YAPP_STATE_INITIAL = 0,
@@ -58,9 +50,4 @@ typedef enum {
     YAPP_BLOCKED_OUTPUT /* the surrounding level is not outputting */
 } YAPP_Output;
 
-/* don't forget what the nesting level says */
-static SLIST_HEAD(output_head, output_s) output_head;
-static struct output_s {
-    SLIST_ENTRY(output_s) next;
-    YAPP_Output out;
-} output, *out;
+void yapp_lex_initialize(FILE *f);
index 9218a80dec1e078bce7a9a81f6136e9f1e91e7f3..636a7f2497a0888a21d2fe21d372a61d27e7c692 100644 (file)
@@ -29,6 +29,7 @@
 
 #include "bytecode.h"
 
+#include "src/preprocs/yapp/yapp-preproc.h"
 #include "src/preprocs/yapp/yapp-token.h"