#include "scanner.h"

#include "../../msg.h"

#include <string.h>
#include <stdlib.h>
#include <stdio.h>

#include "../../rss/rss.h"
#include "../filestack/filestack.h"
#include "../state/state.h"

#include "../parser/tokens.h"   /* parser.h" */

#ifndef fileno
    int fileno(FILE *stream);
#endif

#ifdef unput
    /* If this stops working, have a look at lexer2.c to see what was   */
    /* changed in the flex-implementation                               */

    static void yyunput (int c,char *buf_ptr  );
    void (*unusedUnput)(int c,char *buf_ptr) = &yyunput;
#endif

extern FILE *yyin;
extern FILE *yyout;

extern char    *yytext;
extern int      yyleng;
extern int      yylineno;

extern unsigned   sc_lastLineNr;
extern char    *sc_definition;
extern int      sc_getDefine;
extern int      sc_eof;
extern void     (*sc_ptr)(void);

FILE   *sc_pushFile(char const *filename);
void    sc_startDefinition(void);
void    sc_appendDefinition(int cutoff);
int     sc_popFile();

void yypop_buffer_state(void);


void yypush_buffer_state (YY_BUFFER_STATE new_buffer);
YY_BUFFER_STATE yy_create_buffer (FILE *file, int size);
