/* * 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 "klgmax.h" /*----------------------------------------------------------- | | Routine Name: klgmax_get_args | | Purpose: Gets command line args for klgmax | | Input: None | | Output: None | Written By: ghostwriter -oname klgmax | Date: July 1, 1997 | Modifications: | ------------------------------------------------------------*/ void klgmax_get_args( kaddr opane) { static char *sync_error_mesg = "Generated code for klgmax is out of sync with arguments specified in klgmax's *.pane file; please rerun ghostwriter on klgmax."; kform *pane = (kform *) opane; /* * allocate the klgmax 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, "klgmax_get_args", sync_error_mesg); kexit(KEXIT_FAILURE); } if (!(kclui_get_int(pane, "wpoint", &(clui_info->wpoint_int), &(clui_info->wpoint_flag)))) { kerror(NULL, "klgmax_get_args", sync_error_mesg); kexit(KEXIT_FAILURE); } if (!(kclui_get_int(pane, "hpoint", &(clui_info->hpoint_int), &(clui_info->hpoint_flag)))) { kerror(NULL, "klgmax_get_args", sync_error_mesg); kexit(KEXIT_FAILURE); } if (!(kclui_get_int(pane, "wsize", &(clui_info->wsize_int), &(clui_info->wsize_flag)))) { kerror(NULL, "klgmax_get_args", sync_error_mesg); kexit(KEXIT_FAILURE); } if (!(kclui_get_int(pane, "hsize", &(clui_info->hsize_int), &(clui_info->hsize_flag)))) { kerror(NULL, "klgmax_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, "klgmax_get_args", sync_error_mesg); kexit(KEXIT_FAILURE); } if (!(kclui_get_outfile(pane, "f", &(clui_info->f_file), &(clui_info->f_flag)))) { kerror(NULL, "klgmax_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 'Search for global maximum and generate a binary image and report' subform", "-P 1 0 52x1+0+1 +0+0 ' ' klgmax", "-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/klgmax", "-H 1 5x1+41+0 'Help' 'help page' $MATCHING/objects/kroutine/klgmax/help help", "-Q 1 0 5x1+47+0 'Close'", "-I 1 0 0 1 0 1 52x1+0+2 ' ' 'Input Image ' 'Input data object' i_img", "-i 1 0 1 1 1 29.5x1+21+3.5 1 1 0 1 1 'Width ' 'Specifies the expected point width' wpoint", "-i 1 0 1 1 1 29.5x1+21+4.5 1 1 0 1 1 'Height ' 'Specifies the expected point height' hpoint", "-i 1 0 1 1 1 29.5x1+21+6 2 2 1 1 1 'Width ' 'Specifies the region width' wsize", "-i 1 0 1 1 1 29.5x1+21+7 2 2 1 1 1 'Height ' 'Specifies the region height' hsize", "-O 1 0 0 1 0 1 52x1+0+8.5 ' ' 'Output Image' 'Resulting output data object' o_img", "-O 1 0 0 1 0 1 52x1+0+9.5 ' ' 'ASCII Output' 'Formatted ASCII output file' f", "-b +1+4 'Specify Expected Point:' b1", "-b +1+6.5 'Specify Region Size:' b2", "-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,18,19,20, 21,}; size_t clui_file_lookup[] = { 0,0,0,0,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/klgmax/uis/klgmax.pane", }; /* * UIS struct for clui */ uis_struct clui_uis_spec = { clui_uis, 21, clui_file_lookup, clui_line_lookup, clui_filenames, 1, 512};