/*
 * MultiGIF  V1.0  28-Jun-96  Andy Wardley
 *
 * (C) 1996 Andy Wardley <abw@peritas.com>.  All rights reserved.
 *
 * parse.h
 *
 * Header file for parse.c
 *
 */

#ifndef PARSE_H
#define PARSE_H

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



/*
 * definitions for parse phase 
 */

#define PARSEBUFSIZ  256
#define SPACE        ' '
#define TAB         0x09
#define NULLTERM    '\0'
#define QUOTE       '\"'



/*
 * structure detailing individual frames
 */

typedef struct frame_struct
{
	char *filename;              /* source file             */
	int delay;                   /* pre-frame delay         */
	int user;                    /* user intervention       */
	int replace;                 /* replace mode            */
	int xpos;                    /* x offset                */
	int ypos;                    /* y offset                */
	int locpal;                  /* use local palette?      */
	struct frame_struct *next;   /* next linked list node   */
} frame;



/*
 * global configuration items 
 */

extern int gpalframe;            /* global palette frame    */
extern int bgcol;                /* background colour index */
extern int nsloop;               /* netscape loop number    */
extern int verbose;              /* verbose mode            */
extern int nframes;              /* number of frames        */
extern char *comment;            /* comment string          */
extern char *outfile;            /* output filename         */
extern frame *frameset;          /* linked list of frames   */



/* 
 * function prototypes from parse.c 
 */

void usage(void);
char *next_arg(int argc, char **argv);
frame *add_frame(frame **frameset);
void expand_frame_mask(frame **frameset, char option, char *mask);
void expand_frame_list(frame **frameset, char option, char *mask);
int parse_cmd_line(int argc, char **argv);


#endif /* PARSE_H */
