/************************************************************************/
/* Copyright 2003-2010 MBARI											*/
/************************************************************************/
/* Summary	: Definitions for parsing variables							*/
/* Filename : variable.h												*/
/* Author	: Robert Herlien (rah)										*/
/* Project	: Respirometers												*/
/* Revision : 1.0														*/
/* Created	: 09/01/2010 from config.h									*/
/*																			*/
/* MBARI provides this documentation and code "as is", with no warranty,	*/
/* express or implied, of its quality or consistency. It is provided without*/
/* support and without obligation on the part of the Monterey Bay Aquarium	*/
/* Research Institute to assist in its use, correction, modification, or	*/
/* enhancement. This information should not be published or distributed to	*/
/* third parties without specific written permission from MBARI.			*/
/*																			*/
/************************************************************************/
/* Modification History:												*/
/* 01sep2010 rah - created from config.h								*/
/* $Log $
*/
/************************************************************************/

#ifndef INCvariableh
#define INCvariableh	1

#include <list.h>

typedef struct					/****************************************/
{								/* Structure to hold variable and value */
	Node		vlink;			/* For linked lists						*/
	char		*name;			/* Variable name						*/
	char		*str;			/* String value							*/
	Int32		lval;			/* Long value							*/
	Flt32		fval;			/* Float value							*/
	Word		flags;			/* Flags (see defines below)			*/
} VarStruct;					/****************************************/

#define VF_ISVAL		1
#define VF_ISFLT		2


/****************************************/
/* Function Declarations				*/
/****************************************/

Void			initVars(Void);
VarStruct		*findVariable(char *varName);
Errno			parseVariable(char *name, char *tail);
Int32			longVal(VarStruct *vp);
float			fltVal(VarStruct *vp);
Int16			showVars(Void);
char			*getStringVal(char *s);
MBool			getLongVal(char *s, Int32 *val);
MBool			getFltVal(char *s, Flt32 *val);

#endif	/* INCvariableh */
