/* * Khoros: $Id$ */ #if !defined(__lint) && !defined(__CODECENTER__) static char rcsid[] = "Khoros: $Id$"; #endif /* * Copyright (C) 1997, INPE. Sergio Donizete Faria, Gerald Jean Francis Banon * All rights reserved. See $K_PROG/repos/license/License. */ #include "kinfgen.h" /*----------------------------------------------------------- | | Routine Name: kinfgen_get_args | | Purpose: Gets command line args for kinfgen | | Input: None | | Output: None | Written By: ghostwriter -oname kinfgen | Date: July 1, 1997 | Modifications: | ------------------------------------------------------------*/ void kinfgen_get_args( kaddr opane) { static char *sync_error_mesg = "Generated code for kinfgen is out of sync with arguments specified in kinfgen's *.pane file; please rerun ghostwriter on kinfgen."; kform *pane = (kform *) opane; /* * allocate the kinfgen structure */ clui_info = (clui_info_struct *) kcalloc((size_t)1, sizeof (clui_info_struct)); if (!(kclui_get_infile(pane, "i_img", &(clui_info->i_img_file), &(clui_info->i_img_flag)))) { kerror(NULL, "kinfgen_get_args", sync_error_mesg); kexit(KEXIT_FAILURE); } if (!(kclui_get_infile(pane, "t_img", &(clui_info->t_img_file), &(clui_info->t_img_flag)))) { kerror(NULL, "kinfgen_get_args", sync_error_mesg); kexit(KEXIT_FAILURE); } if (!(kclui_get_int(pane, "interval_length", &(clui_info->interval_length_int), &(clui_info->interval_length_flag)))) { kerror(NULL, "kinfgen_get_args", sync_error_mesg); kexit(KEXIT_FAILURE); } if (!(kclui_get_int(pane, "graylevel", &(clui_info->graylevel_int), &(clui_info->graylevel_flag)))) { kerror(NULL, "kinfgen_get_args", sync_error_mesg); kexit(KEXIT_FAILURE); } if (!(kclui_get_outfile(pane, "o_img", &(clui_info->o_img_file), &(clui_info->o_img_flag)))) { kerror(NULL, "kinfgen_get_args", sync_error_mesg); kexit(KEXIT_FAILURE); } } /* * internal representation of clui UIS file */ char *clui_uis[] = { "-F 4.3 1 0 52x1+0+0 +0+0 'Cantata' cantata", "-M 1 1 52x1+0+0 +1+0 'Inf Generator ' subform", "-P 1 0 52x1+0+1 +0+0 ' ' kinfgen", "-D 1 0 9x1+0+0 'Options' _gui_options", "-H 1 6x1+0+0 'License' 'license' $BOOTSTRAP/repos/license/License license", "-E", "-R 1 0 1 5x1+35+0 'Run' 'execute operation' $MATCHINGBIN/kinfgen", "-H 1 5x1+41+0 'Help' 'help page' $MATCHING/objects/kroutine/kinfgen/help help", "-Q 1 0 5x1+47+0 'Close'", "-I 1 0 0 1 0 1 66x1+0+2 ' ' 'Search Image' 'Search image' i_img", "-I 1 0 0 1 0 1 66x1+0+3 ' ' 'Template' 'Template image' t_img", "-i 1 0 0 1 0 34x1+0+4 1 1 0 0 0 'Interval Length' 'Interval length around template' interval_length", "-i 1 0 0 1 0 34x1+0+5 0 0 255 0 0 'Gray Level' 'Range of data values (gray level)' graylevel", "-O 1 0 0 1 0 1 66x1+0+6 ' ' 'Output Image' 'Resulting output image' o_img", "-E", "-E", "-E", }; size_t clui_line_lookup[] = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,}; size_t clui_file_lookup[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,}; /* * array of uis filenames and line numbers for error messaging */ char *clui_filenames[] = { "$MATCHING/objects/kroutine/kinfgen/uis/kinfgen.pane", }; /* * UIS struct for clui */ uis_struct clui_uis_spec = { clui_uis, 17, clui_file_lookup, clui_line_lookup, clui_filenames, 1, 512};