The MWC screen generator is designed to build data structures
describing background data and input fields form a simple input file.

	scn xyz

Produces xyz.c with internal structures xyz_data and xyz_locs as well
as any defined fields. It also produces an xyz.h file with externs to
those defined fields and an include of scn.h.

The input file first contains a list of all the fields in order of
appearence in the screen. This is terminated by a %% line.
Each input line contains:
	Field name.
	Field Length.	This is zero for read only fields and negative
			for fields where the default value is in a field.
			This defaults to a field long enough to fill the line.
	Default field.	If the field length is 0 for read only this should be
			the true field length. If the field length is negative
			this is a default field, in this case this defaults
			to the field name. Otherwise this is used as a string.
	Verify routine. This is the name of a function which is called with
			the field as a parm. That function should return 0
			if the field is invalid and non 0 if it is valid.
			The default is no verify function.

	Skip factor.	If the verify routine returns -1 Skip factor fields
			are skipped. This allows you to ask a yes or no
			question and skip fields if the is n.

f1, 5, xyz, ver1	; results to f1, max len 5 default "xyz" ver1
			; is verify routine.
f2, -5, f1, ver2	; results to f2, max len 5 default f1 ver2
			; is verify routine.
f3,  0,  17		; f3 length 17 is displayed and is read only.

Note comments are illegal in actual format.

Often it is convienient to input data into arrays of fields. A line starting
%  linesCount repeatCount
Says that the next lineCount fields repeat repeatCount times.

% 2 3
expect, -20
send, -20

Says that there are 3 expect and send fields. This generates 
char expect[3][21];
char send[3][21];

While inside a data array is is legal to use a skip factor of "group".
scn will replace this with the number of fields required to skip out
of the current group.

In the .c file. Note the 21 is a field length of 20 and a place for
the zero termination.

Then comes the input screen formatteed exactly as it should appear.
The beginning of each input field should be marked with a '!'. This
chan be changed with a -f option.
	scn -f# xyz

Would mark input fileds with a '#'.

xyz_data contains the background data for the screen. It is decribed
by the struct backGrnd in scn.h. Each structure is a line of data
followed by its screen position. The array of structures ends wiht a
data pointer of NULL.

xyz_locs contains the input field data for the screen. Itis described
by the struct loc in scn.h. It contains a pointer to the input field
and the row and collumn of the data.

		Driver Functions.

setUpScreen(lines, at)
	This initializes the screen driver and sets up a window for
	error messages or conversational messages. setUpScreen(3, 22)
	reserves line 22, 23 and 24 for messages.

closeUp()
	Shuts down the screen dirver, always call it at the end of job.

showError(s, ...)
	Takes the same format as printf, shows an error message and
	waits for any key to continue.

Query(s, ...)
	Prints a query message waits for any key and returns that key.

clearArea(row, col, len)
	Clears the screen at row, col for len.

showBak(back)
	Displays screen background. showBak(my_data);

clearBak(back, locs)
	Clears the screen background and the area set aside for data.

showDefs(back, fields)
	Show the background and all default data. showDefs(my_data, my_locs);

scnDriv(back, fields)
	Show the background and get all data.

getAll(fields)
	Get and verify all data fields.

getField(fields, field)
	Get one field. getField(my_locs, myString);
	myString must be a field name in your screen file.

putField(fields, field)
	Display one field. putField(my_locs, myString);
	myString must be a field name in your screen file.

numeric(str)
	Returns 1 if str is numeric else 0.

nonNull(str)
	Returns 1 if str has some data in it else 0.

yesNo(str)
	Returns 1 if str is in [yYnN] else 0.
