#ifndef _CONFIG_
#define _CONFIG_

#include <stdio.h>

struct FPos
{
	FPos *next;

	fpos_t fpos;
};

#include "lineparser.hh"

struct ConfigParser: LineParser
{
	char *filename;
	char *dir;
	FILE *fid;
	int line_num;
	int mode;

	ConfigParser ();  

	FPos *first_fpos;
	int fpos_push ();
	int fpos_pop ();

	int parse (char *, int=0);
	int error (const char *, ...);
	int get_filename (char *&);
	virtual int get_line ();
	int parse_anim_style ();
	int parse_menu ();
	int parse_menu_style ();
	int parse_pager_style ();
	int parse_log_style ();
	int parse_window_styles ();
};

#define CM_COMMENT (1<<0)
#define CM_SHELL   (1<<1)

#endif
