 /*
  * Khoros: $Id: form_init.c,v 1.3 1992/03/20 22:52:24 dkhoros Exp $
  */

#if !defined(lint) && !defined(SABER)
static char rcsid[] = "Khoros: $Id: form_init.c,v 1.3 1992/03/20 22:52:24 dkhoros Exp $";
#endif

 /*
  * $Log: form_init.c,v $
 * Revision 1.3  1992/03/20  22:52:24  dkhoros
 * VirtualPatch5
 *
  */

/*
 *---------------------------------------------------------------------
 *            Copyright 1990 University of New Mexico
 * 
 * Permission to copy and modify this software and its documen- 
 * tation only for internal use in your organization is hereby 
 * granted, provided that this notice is retained thereon and 
 * on all copies.  UNM makes no representations as too the sui- 
 * tability and operability of this software for any purpose. 
 * It is provided 'as is' without express or implied warranty. 
 *  
 * UNM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 
 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FIT- 
 * NESS.  IN NO EVENT SHALL UNM BE LIABLE FOR ANY SPECIAL, 
 * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY OTHER DAMAGES WHAT- 
 * SOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER 
 * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS 
 * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PER- 
 * FORMANCE OF THIS SOFTWARE. 
 *  
 * No other rights, including for example, the right to redis- 
 * tribute this software and its documentation or the right to 
 * prepare derivative works, are granted unless specifically 
 * provided in a separate license agreement. 
 * 
 *---------------------------------------------------------------------
 */
#include "unmcopyright.h"
#include "xvforms.h"
#include "form_info.h"


/*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>  <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
 >>>>
 >>>>         File Name:  form_init.c
 >>>>
 >>>>      Program Desc:  code to initialize fields
 >>>>                      in the structure found in form_info.h
 >>>>
 >>>>            Author:  automatically generated by conductor
 >>>>
 >>>> Date Last Updated:  Sat Mar 14 14:31:34 1992
 >>>>
 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>   <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/


_xvf_init_Master(formptr,forminfo)

xvf_form *formptr; 
Master *forminfo;
{
	int index;
	Line_Info line_info;
	char **database;

	xvf_clear_line_info(&line_info);
	database = formptr->db;

	/***** initializing 'Master' Form Information structure *****/

	forminfo->Kraftsman = (Master_Kraftsman *) 
			  malloc(sizeof(Master_Kraftsman));


	index = 1;

	xvf_parse_startsubform_line(database[index], &line_info);
	forminfo->Kraftsman_selected = line_info.selected;
	forminfo->Kraftsman_index = 1;
	forminfo->Kraftsman_sfb_index = 0;

	/*** initializing 'forminfo->Kraftsman'
	      Subform Information structure ***/

	forminfo->Kraftsman->delete = false;
	forminfo->Kraftsman->remove = false;
	forminfo->Kraftsman->quit = false;
	forminfo->Kraftsman->create = (Kraftsman_create *) 
			  malloc(sizeof(Kraftsman_create));


	index = 11;

	xvf_parse_startpane_line(database[index], &line_info);
	forminfo->Kraftsman->create_selected = line_info.selected;
	forminfo->Kraftsman->create_index = 11;
	forminfo->Kraftsman->create_gb_index = 3;
	index++;


	/* initializing 'forminfo->Kraftsman->create'
	       Pane Information structure */

	xvf_parse_string_line(database[index], &line_info);
	if (line_info.string_def != NULL) {
	   forminfo->Kraftsman->create->toolbox = 
		xvf_strcpy(line_info.string_def);
	}
	else  forminfo->Kraftsman->create->toolbox = NULL;

	xvf_deparse_string_line(&line_info, database,index);
	forminfo->Kraftsman->create->toolbox_index = index;
forminfo->Kraftsman->create->toolbox_selected = false;
	index++;

	xvf_parse_string_line(database[index], &line_info);
	if (line_info.string_def != NULL) {
	   forminfo->Kraftsman->create->toolpath = 
		xvf_strcpy(line_info.string_def);
	}
	else  forminfo->Kraftsman->create->toolpath = NULL;

	xvf_deparse_string_line(&line_info, database,index);
	forminfo->Kraftsman->create->toolpath_index = index;
	index++;

	xvf_parse_string_line(database[index], &line_info);
	if (line_info.string_def != NULL) {
	   forminfo->Kraftsman->create->author = 
		xvf_strcpy(line_info.string_def);
	}
	else  forminfo->Kraftsman->create->author = NULL;

	xvf_deparse_string_line(&line_info, database,index);
	forminfo->Kraftsman->create->author_index = index;
	index++;

	xvf_parse_string_line(database[index], &line_info);
	if (line_info.string_def != NULL) {
	   forminfo->Kraftsman->create->user = 
		xvf_strcpy(line_info.string_def);
	}
	else  forminfo->Kraftsman->create->user = NULL;

	xvf_deparse_string_line(&line_info, database,index);
	forminfo->Kraftsman->create->user_index = index;
	index++;

	xvf_parse_string_line(database[index], &line_info);
	if (line_info.string_def != NULL) {
	   forminfo->Kraftsman->create->title = 
		xvf_strcpy(line_info.string_def);
	}
	else  forminfo->Kraftsman->create->title = NULL;

	xvf_deparse_string_line(&line_info, database,index);
	forminfo->Kraftsman->create->title_index = index;
	index++;

	xvf_parse_string_line(database[index], &line_info);
	if (line_info.string_def != NULL) {
	   forminfo->Kraftsman->create->sdescript = 
		xvf_strcpy(line_info.string_def);
	}
	else  forminfo->Kraftsman->create->sdescript = NULL;

	xvf_deparse_string_line(&line_info, database,index);
	forminfo->Kraftsman->create->sdescript_index = index;
	index++;

	xvf_parse_string_line(database[index], &line_info);
	if (line_info.string_def != NULL) {
	   forminfo->Kraftsman->create->info = 
		xvf_strcpy(line_info.string_def);
	}
	else  forminfo->Kraftsman->create->info = NULL;

	xvf_deparse_string_line(&line_info, database,index);
	forminfo->Kraftsman->create->info_index = index;
	index++;

	forminfo->Kraftsman->create->create = false;
	forminfo->Kraftsman->create->create_index = index;
	index++;

	forminfo->Kraftsman->create->add = false;
	forminfo->Kraftsman->create->add_index = index;
	index++;

	index++;

	forminfo->Kraftsman->configure = (Kraftsman_configure *) 
			  malloc(sizeof(Kraftsman_configure));


	index = 23;

	xvf_parse_startpane_line(database[index], &line_info);
	forminfo->Kraftsman->configure_selected = line_info.selected;
	forminfo->Kraftsman->configure_index = 23;
	forminfo->Kraftsman->configure_gb_index = 4;
	index++;


	/* initializing 'forminfo->Kraftsman->configure'
	       Pane Information structure */

	xvf_parse_string_line(database[index], &line_info);
	if (line_info.string_def != NULL) {
	   forminfo->Kraftsman->configure->toolbox = 
		xvf_strcpy(line_info.string_def);
	}
	else  forminfo->Kraftsman->configure->toolbox = NULL;

	xvf_deparse_string_line(&line_info, database,index);
	forminfo->Kraftsman->configure->toolbox_index = index;
forminfo->Kraftsman->configure->toolbox_selected = false;
	index++;

	forminfo->Kraftsman->configure->tselect = false;
	forminfo->Kraftsman->configure->tselect_index = index;
	index++;

	xvf_parse_string_line(database[index], &line_info);
	if (line_info.string_def != NULL) {
	   forminfo->Kraftsman->configure->libdir = 
		xvf_strcpy(line_info.string_def);
	}
	else  forminfo->Kraftsman->configure->libdir = NULL;

	xvf_deparse_string_line(&line_info, database,index);
	forminfo->Kraftsman->configure->libdir_index = index;
	index++;

	xvf_parse_string_line(database[index], &line_info);
	if (line_info.string_def != NULL) {
	   forminfo->Kraftsman->configure->bindir = 
		xvf_strcpy(line_info.string_def);
	}
	else  forminfo->Kraftsman->configure->bindir = NULL;

	xvf_deparse_string_line(&line_info, database,index);
	forminfo->Kraftsman->configure->bindir_index = index;
	index++;

	xvf_parse_string_line(database[index], &line_info);
	if (line_info.string_def != NULL) {
	   forminfo->Kraftsman->configure->libpath = 
		xvf_strcpy(line_info.string_def);
	}
	else  forminfo->Kraftsman->configure->libpath = NULL;

	xvf_deparse_string_line(&line_info, database,index);
	forminfo->Kraftsman->configure->libpath_index = index;
	index++;

	xvf_parse_string_line(database[index], &line_info);
	if (line_info.string_def != NULL) {
	   forminfo->Kraftsman->configure->incpath = 
		xvf_strcpy(line_info.string_def);
	}
	else  forminfo->Kraftsman->configure->incpath = NULL;

	xvf_deparse_string_line(&line_info, database,index);
	forminfo->Kraftsman->configure->incpath_index = index;
	index++;

	xvf_parse_string_line(database[index], &line_info);
	if (line_info.string_def != NULL) {
	   forminfo->Kraftsman->configure->ccdef = 
		xvf_strcpy(line_info.string_def);
	}
	else  forminfo->Kraftsman->configure->ccdef = NULL;

	xvf_deparse_string_line(&line_info, database,index);
	forminfo->Kraftsman->configure->ccdef_index = index;
	index++;

	xvf_parse_string_line(database[index], &line_info);
	if (line_info.string_def != NULL) {
	   forminfo->Kraftsman->configure->toollib = 
		xvf_strcpy(line_info.string_def);
	}
	else  forminfo->Kraftsman->configure->toollib = NULL;

	xvf_deparse_string_line(&line_info, database,index);
	forminfo->Kraftsman->configure->toollib_index = index;
	index++;

	xvf_parse_string_line(database[index], &line_info);
	if (line_info.string_def != NULL) {
	   forminfo->Kraftsman->configure->forlib = 
		xvf_strcpy(line_info.string_def);
	}
	else  forminfo->Kraftsman->configure->forlib = NULL;

	xvf_deparse_string_line(&line_info, database,index);
	forminfo->Kraftsman->configure->forlib_index = index;
	index++;

	xvf_parse_string_line(database[index], &line_info);
	if (line_info.string_def != NULL) {
	   forminfo->Kraftsman->configure->xlib = 
		xvf_strcpy(line_info.string_def);
	}
	else  forminfo->Kraftsman->configure->xlib = NULL;

	xvf_deparse_string_line(&line_info, database,index);
	forminfo->Kraftsman->configure->xlib_index = index;
	index++;

	forminfo->Kraftsman->configure->configure = false;
	forminfo->Kraftsman->configure->configure_index = index;
	index++;

	index++;

	return(true);

}

