home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d5xx
/
d598
/
parse.lha
/
Parse
/
src.lha
/
parse.h
< prev
Wrap
Text File
|
1992-01-30
|
3KB
|
81 lines
/***************************************************************************
Program:
File: Parse.h
Version: V1.0
Date: 11.07.90
Function: Include file for the command parser
Copyright: SciTech Software 1991
Author: Andrew C. R. Martin
Address: SciTech Software
23, Stag Leys,
Ashtead,
Surrey,
KT21 2TD.
Phone: +44 (0372) 275775
EMail: UUCP: cbmuk!cbmuka!scitec!amartin
JANET: andrew@uk.ac.ox.biop
Written while at:
Laboratory of Mathematical Biology
National Institue for Medical Research,
The Ridgeway,
Mill Hill,
London,
NW7 1AA
****************************************************************************
This program is not in the public domain, but it may be freely copied
and distributed for no charge providing this header is included.
The code may be modified as required, but any modifications must be
documented so that the person responsible can be identified. If someone
else breaks this code, I don't want to be blamed for code that does not
work! The code may not be sold commercially without prior permission from
the author, although it may be given away free with commercial products,
providing it is made clear that this program is free and that the source
code is provided with the program.
****************************************************************************
Description:
============
Here are defined the MAKEKEY macro, STRING and NUMBER defines, the
KeyWd structure and return values for the parser.
****************************************************************************
Usage:
======
****************************************************************************
Revision History:
=================
***************************************************************************/
/* Defines used for the MAKEKEY macro */
#define STRING 1
#define NUMBER 0
/* Return values from parse() */
#define PARSE_ERRC -1
#define PARSE_ERRP -2
#define PARSE_COMMENT -3
/* Definition of the KeyWd structure in which we store keywords */
typedef struct
{
char *name;
int string, nparam;
} KeyWd;
/* Macro to create a keyword */
#define MAKEKEY(x,w,v,z) \
(x).name = (char *)malloc((strlen(w)+2) * sizeof(char)); \
strcpy((x).name,w); \
(x).string = v; \
(x).nparam = z