Move static structures from .h to .c, include .h in .l.

svn path=/trunk/yasm/; revision=492
0.3
Peter Johnson 23 years ago
parent 4933f17355
commit c855e4061e
  1. 16
      modules/preprocs/yapp/yapp-preproc.c
  2. 15
      modules/preprocs/yapp/yapp-preproc.h
  3. 1
      modules/preprocs/yapp/yapp-token.l
  4. 16
      src/preprocs/yapp/yapp-preproc.c
  5. 15
      src/preprocs/yapp/yapp-preproc.h
  6. 1
      src/preprocs/yapp/yapp-token.l

@ -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 (?) */

@ -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);

@ -29,6 +29,7 @@
#include "bytecode.h"
#include "src/preprocs/yapp/yapp-preproc.h"
#include "src/preprocs/yapp/yapp-token.h"

@ -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 (?) */

@ -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);

@ -29,6 +29,7 @@
#include "bytecode.h"
#include "src/preprocs/yapp/yapp-preproc.h"
#include "src/preprocs/yapp/yapp-token.h"

Loading…
Cancel
Save