contents

read_instruction

Called by:   main once for each line present on input stream instructfile.

Includes:   iscloc.h

Input arguments:
Single instruction line read by main.
Pointer to event structure.
String declared in main to hold the filename of an ISF input file.

Structure members updated:
evid, seed_agency, depth_agency, location_agency, time_agency, fixed_depth, fixed_lat, fixed_lon, fixed_time, reid_phase, purge_phase, and fix_on_depdp in event structure.

Return:   0/1 for success/failure.

This function parses a single line, splitting its contents into words separated by white space.  If a word is a bare integer then it is taken as the evid of the next event to be input from the database, otherwise it is expected to either be one of the recognised flags or of the format parameter=value, in which case the parameter part is checked against a list of expected parameters.

The flags recognised are: no_reid_phase, no_purge_phase, and  fix_on_depdp.

Parameters are expected to be followed by = and a value. The recognised ones are: filename, seed, depth, location, lat, lon, and  time.

There must be at least one word on each line and this must be either an evid or a filename.  Only one of these two options can be present on a single line.  If an evid is given then this is stored in the event structure to be read by get_data.  If a filename is given then the corresponding file is expected to contain ISF event data and it is passed back to main by assigning it to the character pointer sent to this function as an argument.

Any additional options are used to assign values to members of the event structure.  These either concern the selection of starting point and number of unknowns