 /*
  * Khoros: $Id: form_info.c,v 1.3 1992/03/20 22:50:23 dkhoros Exp $
  */

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

 /*
  * $Log: form_info.c,v $
 * Revision 1.3  1992/03/20  22:50:23  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_info.c
 >>>>
 >>>>      Program Desc:  code to extract values
 >>>>                     from the graphical user interface 
 >>>>
 >>>>            Author:  automatically generated by conductor
 >>>>
 >>>> Date Last Updated:  Fri Mar 13 14:34:47 1992
 >>>>
 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>   <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/


/********************************************************
*
*  Routine Name: xvf_get_Composer
*
*       Purpose: Fills in the user-specified
*                'Composer'
*                 structure according to the info currently
*                stored in the database by xvforms.
*
*        Input:  formptr - pointer to the xvf_form structure
*                forminfo - pointer to the user-specified
*                'Composer'
*
*       Output:  current values stored in  Composer
*
*    Called By:  the application program when appropriate
*
*   Automatically Generated By:  conductor*
********************************************************/


_xvf_get_Composer(formptr, forminfo)

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

	xvf_clear_line_info(&line_info);

	database = formptr->db;

	/***** getting 'Composer' Form Information structure *****/


	index = 7;

	xvf_parse_quit_line(database[index], &line_info);
	forminfo->quit = line_info.selected;

	index = 9;

	xvf_parse_startsubform_line(database[index], &line_info);
	forminfo->pane_selected = line_info.selected;

	index = 67;

	xvf_parse_startsubform_line(database[index], &line_info);
	forminfo->prog_selected = line_info.selected;

	index = 103;

	xvf_parse_startsubform_line(database[index], &line_info);
	forminfo->conf_manage_selected = line_info.selected;

}

/********************************************************
*
*  Routine Name: xvf_get_pane
*
*       Purpose: Fills in the user-specified
*                'Composer_pane'
*                 structure according to the info currently
*                stored in the database by xvforms.
*
*        Input:  formptr - pointer to the xvf_form structure
*                subforminfo - pointer to the user-specified
*                'Composer_pane'
*
*       Output:  current values stored in  'Composer_pane'
*
*    Called By:  the application program when appropriate

*
*   Automatically Generated By:  conductor*
********************************************************/


_xvf_get_pane(formptr, subforminfo)

xvf_form *formptr;
Composer_pane *subforminfo;
{
	int index;
	Line_Info line_info;
	char **database;

	xvf_clear_line_info(&line_info);

	database = formptr->db;
	index = 10;


	/*** extracting 'Composer->pane'
 	   Subform Information structure ***/


	index = 10;
	xvf_parse_startpane_line(database[index], &line_info);
	subforminfo->edit_pane_selected = line_info.selected;

}



/********************************************************
*
*  Routine Name: xvf_get_prog
*
*       Purpose: Fills in the user-specified
*                'Composer_prog'
*                 structure according to the info currently
*                stored in the database by xvforms.
*
*        Input:  formptr - pointer to the xvf_form structure
*                subforminfo - pointer to the user-specified
*                'Composer_prog'
*
*       Output:  current values stored in  'Composer_prog'
*
*    Called By:  the application program when appropriate

*
*   Automatically Generated By:  conductor*
********************************************************/


_xvf_get_prog(formptr, subforminfo)

xvf_form *formptr;
Composer_prog *subforminfo;
{
	int index;
	Line_Info line_info;
	char **database;

	xvf_clear_line_info(&line_info);

	database = formptr->db;
	index = 68;


	/*** extracting 'Composer->prog'
 	   Subform Information structure ***/


	index = 68;
	xvf_parse_startpane_line(database[index], &line_info);
	subforminfo->edit_prog_selected = line_info.selected;

}



/********************************************************
*
*  Routine Name: xvf_get_conf_manage
*
*       Purpose: Fills in the user-specified
*                'Composer_conf_manage'
*                 structure according to the info currently
*                stored in the database by xvforms.
*
*        Input:  formptr - pointer to the xvf_form structure
*                subforminfo - pointer to the user-specified
*                'Composer_conf_manage'
*
*       Output:  current values stored in  'Composer_conf_manage'
*
*    Called By:  the application program when appropriate

*
*   Automatically Generated By:  conductor*
********************************************************/


_xvf_get_conf_manage(formptr, subforminfo)

xvf_form *formptr;
Composer_conf_manage *subforminfo;
{
	int index;
	Line_Info line_info;
	char **database;

	xvf_clear_line_info(&line_info);

	database = formptr->db;
	index = 104;


	/*** extracting 'Composer->conf_manage'
 	   Subform Information structure ***/


	index = 104;
	xvf_parse_startpane_line(database[index], &line_info);
	subforminfo->ghost_routines_selected = line_info.selected;

}



/********************************************************
*
*  Routine Name: xvf_get_edit_pane
*
*       Purpose: Fills in the user-specified
*                'pane_edit_pane'
*                 structure according to the info currently
*                stored in the database by xvforms.
*
*        Input:  formptr - pointer to the xvf_form structure
*                paneinfo - pointer to the user-specified
*                'pane_edit_pane'
*
*       Output:  current values stored in  'pane_edit_pane'
*
*    Called By:  the application program when appropriate
*
*   Automatically Generated By:  conductor*
********************************************************/


_xvf_get_edit_pane(formptr, paneinfo)

xvf_form *formptr;
pane_edit_pane *paneinfo;
{
	int index;
	Line_Info line_info;
	char **database;

	xvf_clear_line_info(&line_info);

	database = formptr->db;
	index = 11;


	/* extracting 'Composer->pane->edit_pane'
 	   Pane Information structure */

	xvf_parse_input_line(database[index], &line_info);
	if (line_info.filename != NULL) {
	   paneinfo->pane_file = 
		xvf_strcpy(line_info.filename);
	}
	else  paneinfo->pane_file = NULL;

	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->read_pane = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->save_pane = line_info.selected;
	index++;

	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->select_I = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->select_O = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->select_f = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->select_i = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->select_s = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->select_l = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->select_T = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->select_C = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->select_b = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->select_P = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->select_a = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->select_H = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->select_Q = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->select_R = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->delete = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->copy = line_info.selected;
	index++;

	index++;

	xvf_parse_string_line(database[index], &line_info);
	if (line_info.string_val != NULL) {
	   paneinfo->var_name = 
		xvf_strcpy(line_info.string_val);
	}
	else  paneinfo->var_name = NULL;

	index++;

	xvf_parse_string_line(database[index], &line_info);
	if (line_info.string_val != NULL) {
	   paneinfo->name = 
		xvf_strcpy(line_info.string_val);
	}
	else  paneinfo->name = NULL;

	index++;

	xvf_parse_string_line(database[index], &line_info);
	if (line_info.string_val != NULL) {
	   paneinfo->button_label = 
		xvf_strcpy(line_info.string_val);
	}
	else  paneinfo->button_label = NULL;

	paneinfo->button_label_selected = line_info.selected;
	index++;

	xvf_parse_string_line(database[index], &line_info);
	if (line_info.string_val != NULL) {
	   paneinfo->usage_string = 
		xvf_strcpy(line_info.string_val);
	}
	else  paneinfo->usage_string = NULL;

	index++;

	xvf_parse_string_line(database[index], &line_info);
	if (line_info.string_val != NULL) {
	   paneinfo->default_string = 
		xvf_strcpy(line_info.string_val);
	}
	else  paneinfo->default_string = NULL;

	paneinfo->default_string_selected = line_info.selected;
	index++;

	xvf_parse_logic_line(database[index], &line_info);
	paneinfo->active = line_info.logical_val;
	paneinfo->active_selected = line_info.selected;
	index++;

	xvf_parse_logic_line(database[index], &line_info);
	paneinfo->live = line_info.logical_val;
	paneinfo->live_selected = line_info.selected;
	index++;

	xvf_parse_logic_line(database[index], &line_info);
	paneinfo->optional = line_info.logical_val;
	paneinfo->optional_selected = line_info.selected;
	index++;

	xvf_parse_logic_line(database[index], &line_info);
	paneinfo->opt_selected = line_info.logical_val;
	paneinfo->opt_selected_selected = line_info.selected;
	index++;

	index++;

	xvf_parse_int_line(database[index], &line_info);
	paneinfo->gs_width = line_info.int_val;
	paneinfo->gs_width_selected = line_info.selected;
	index++;

	xvf_parse_int_line(database[index], &line_info);
	paneinfo->gs_height = line_info.int_val;
	paneinfo->gs_height_selected = line_info.selected;
	index++;

	xvf_parse_int_line(database[index], &line_info);
	paneinfo->gs_xoff = line_info.int_val;
	paneinfo->gs_xoff_selected = line_info.selected;
	index++;

	xvf_parse_int_line(database[index], &line_info);
	paneinfo->gs_yoff = line_info.int_val;
	paneinfo->gs_yoff_selected = line_info.selected;
	index++;

	xvf_parse_int_line(database[index], &line_info);
	paneinfo->ps_xoff = line_info.int_val;
	paneinfo->ps_xoff_selected = line_info.selected;
	index++;

	xvf_parse_int_line(database[index], &line_info);
	paneinfo->ps_yoff = line_info.int_val;
	paneinfo->ps_yoff_selected = line_info.selected;
	index++;

	xvf_parse_toggle_line(database[index], &line_info);
	paneinfo->toggle_range_val = line_info.toggle_val;
	paneinfo->toggle_range_selected = line_info.selected;
	index++;

	index = 56;
	xvf_parse_float_line(database[index], &line_info);
	paneinfo->default_float = line_info.float_val;
	paneinfo->default_float_selected = line_info.selected;
	index++;

	index++;

	xvf_parse_float_line(database[index], &line_info);
	paneinfo->lower_range = line_info.float_val;
	index++;

	xvf_parse_float_line(database[index], &line_info);
	paneinfo->upper_range = line_info.float_val;
	index++;

	index++;

	xvf_parse_string_line(database[index], &line_info);
	if (line_info.string_val != NULL) {
	   paneinfo->zero_label = 
		xvf_strcpy(line_info.string_val);
	}
	else  paneinfo->zero_label = NULL;

	paneinfo->zero_label_selected = line_info.selected;
	index++;

	xvf_parse_string_line(database[index], &line_info);
	if (line_info.string_val != NULL) {
	   paneinfo->one_label = 
		xvf_strcpy(line_info.string_val);
	}
	else  paneinfo->one_label = NULL;

	paneinfo->one_label_selected = line_info.selected;
	index++;

	xvf_parse_logic_line(database[index], &line_info);
	paneinfo->default_logical = line_info.logical_val;
	paneinfo->default_logical_selected = line_info.selected;
	index++;

	xvf_parse_quit_line(database[index], &line_info);
	paneinfo->quit = line_info.selected;
	index++;



}


/********************************************************
*
*  Routine Name: xvf_get_edit_prog
*
*       Purpose: Fills in the user-specified
*                'prog_edit_prog'
*                 structure according to the info currently
*                stored in the database by xvforms.
*
*        Input:  formptr - pointer to the xvf_form structure
*                paneinfo - pointer to the user-specified
*                'prog_edit_prog'
*
*       Output:  current values stored in  'prog_edit_prog'
*
*    Called By:  the application program when appropriate
*
*   Automatically Generated By:  conductor*
********************************************************/


_xvf_get_edit_prog(formptr, paneinfo)

xvf_form *formptr;
prog_edit_prog *paneinfo;
{
	int index;
	Line_Info line_info;
	char **database;

	xvf_clear_line_info(&line_info);

	database = formptr->db;
	index = 69;


	/* extracting 'Composer->prog->edit_prog'
 	   Pane Information structure */

	xvf_parse_input_line(database[index], &line_info);
	if (line_info.filename != NULL) {
	   paneinfo->prog_file = 
		xvf_strcpy(line_info.filename);
	}
	else  paneinfo->prog_file = NULL;

	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->read_prog = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->save_prog = line_info.selected;
	index++;

	index++;

	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->authors = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->short_prog_description = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->man1_long_description = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->man1_examples = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->man1_restrictions = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->man1_see_also = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->usage_additions = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->include_includes = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->include_additions = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->include_macros = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->main_variable_list = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->main_before_lib_call = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->main_library_call = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->main_after_lib_call = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->library_def = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->library_includes = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->library_code = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->short_lib_description = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->man3_long_description = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->man3_see_also = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->man3_restrictions = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->library_mods = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->library_input = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->library_output = line_info.selected;
	index++;

	index++;

	xvf_parse_string_line(database[index], &line_info);
	if (line_info.string_val != NULL) {
	   paneinfo->prog_text = 
		xvf_strcpy(line_info.string_val);
	}
	else  paneinfo->prog_text = NULL;

	index++;

	xvf_parse_quit_line(database[index], &line_info);
	paneinfo->quit = line_info.selected;
	index++;



}


/********************************************************
*
*  Routine Name: xvf_get_ghost_routines
*
*       Purpose: Fills in the user-specified
*                'conf_manage_ghost_routines'
*                 structure according to the info currently
*                stored in the database by xvforms.
*
*        Input:  formptr - pointer to the xvf_form structure
*                paneinfo - pointer to the user-specified
*                'conf_manage_ghost_routines'
*
*       Output:  current values stored in  'conf_manage_ghost_routines'
*
*    Called By:  the application program when appropriate
*
*   Automatically Generated By:  conductor*
********************************************************/


_xvf_get_ghost_routines(formptr, paneinfo)

xvf_form *formptr;
conf_manage_ghost_routines *paneinfo;
{
	int index;
	Line_Info line_info;
	char **database;

	xvf_clear_line_info(&line_info);

	database = formptr->db;
	index = 105;


	/* extracting 'Composer->conf_manage->ghost_routines'
 	   Pane Information structure */

	index++;

	xvf_parse_string_line(database[index], &line_info);
	if (line_info.string_val != NULL) {
	   paneinfo->name = 
		xvf_strcpy(line_info.string_val);
	}
	else  paneinfo->name = NULL;

	index++;

	xvf_parse_string_line(database[index], &line_info);
	if (line_info.string_val != NULL) {
	   paneinfo->project = 
		xvf_strcpy(line_info.string_val);
	}
	else  paneinfo->project = NULL;

	index++;

	xvf_parse_logic_line(database[index], &line_info);
	paneinfo->con_file = line_info.logical_val;
	index++;

	xvf_parse_logic_line(database[index], &line_info);
	paneinfo->install = line_info.logical_val;
	index++;

	index++;

	xvf_parse_logic_line(database[index], &line_info);
	paneinfo->lib = line_info.logical_val;
	index++;

	xvf_parse_logic_line(database[index], &line_info);
	paneinfo->man3 = line_info.logical_val;
	index++;

	index++;

	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->exec_ghost = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->exec_ghostcheck = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->exec_ghostreader = line_info.selected;
	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->exec_make = line_info.selected;
	index++;

	index++;

	index++;

	xvf_parse_pane_action_line(database[index], &line_info);
	paneinfo->exec_kinstall = line_info.selected;
	index++;

	xvf_parse_quit_line(database[index], &line_info);
	paneinfo->quit = line_info.selected;
	index++;



}


