/* --- CFIG.H
   --- Copyright 1993 Trident Robotics and Research, Inc.
   ---
   --- Companion header file to the configuration file utilities
   --- in cfig.c.
   ---
   --- */

#ifndef CFIG_H
#define CFIG_H

typedef struct{
          char  filename[128];
          FILE  *fp;
          char  buffer[256];
        } cfigfile_t;

#define CFIG_R          0x0001
#define CFIG_W          0x0002
#define CFIG_RW         0x0003

#ifndef CFIG_SRC

/* This function initializes the cfig structure and opens the file. */
extern cfigfile_t *cfigInit(char *file, int flags);

extern int cfigCompulsory(cfigfile_t *cfig, char *tag, void *buf,
                          int type, int num);

extern int cfigOptional(cfigfile_t *cfig, char *tag, void *buf,
                          int type, int num);

extern cfigfile_t *cfigInit(char *file, int flags);

#endif
#endif
