/* * 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 "klgmaxrel.h" /*----------------------------------------------------------- | | Routine Name: klgmaxrel_get_args | | Purpose: Gets command line args for klgmaxrel | | Input: None | | Output: None | Written By: ghostwriter -oname klgmaxrel | Date: July 1, 1997 | Modifications: | ------------------------------------------------------------*/ void klgmaxrel_get_args( kaddr opane) { static char *sync_error_mesg = "Generated code for klgmaxrel is out of sync with arguments specified in klgmaxrel's *.pane file; please rerun ghostwriter on klgmaxrel."; kform *pane = (kform *) opane; /* * allocate the klgmaxrel 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, "klgmaxrel_get_args", sync_error_mesg); kexit(KEXIT_FAILURE); } if (!(kclui_get_double(pane, "lat", &(clui_info->lat_double), &(clui_info->lat_flag)))) { kerror(NULL, "klgmaxrel_get_args", sync_error_mesg); kexit(KEXIT_FAILURE); } if (!(kclui_get_double(pane, "lon", &(clui_info->lon_double), &(clui_info->lon_flag)))) { kerror(NULL, "klgmaxrel_get_args", sync_error_mesg); kexit(KEXIT_FAILURE); } if (!(kclui_get_double(pane, "alt", &(clui_info->alt_double), &(clui_info->alt_flag)))) { kerror(NULL, "klgmaxrel_get_args", sync_error_mesg); kexit(KEXIT_FAILURE); } if (!(kclui_get_int(pane, "wsize", &(clui_info->wsize_int), &(clui_info->wsize_flag)))) { kerror(NULL, "klgmaxrel_get_args", sync_error_mesg); kexit(KEXIT_FAILURE); } if (!(kclui_get_int(pane, "hsize", &(clui_info->hsize_int), &(clui_info->hsize_flag)))) { kerror(NULL, "klgmaxrel_get_args", sync_error_mesg); kexit(KEXIT_FAILURE); } if (!(kclui_get_outfile(pane, "f", &(clui_info->f_file), &(clui_info->f_flag)))) { kerror(NULL, "klgmaxrel_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, "klgmaxrel_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 report' subform", "-P 1 0 52x1+0+1 +0+0 ' ' klgmaxrel", "-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/klgmaxrel", "-H 1 5x1+41+0 'Help' 'help page' $MATCHING/objects/kroutine/klgmaxrel/help help", "-Q 1 0 5x1+47+0 'Close'", "-I 1 0 0 1 0 1 56x1+0+2 ' ' 'Input Image ' 'Input data object' i_img", "-h 1 0 1 1 0 35x1+19+3.5 -90 90 0 14 1 0 'Lat' 'Specify expected point latitude' lat", "-h 1 0 1 1 0 35x1+19+4.5 -180 180 0 14 1 0 'Lon' 'Specify expected point latitude' lon", "-h 1 0 1 1 0 35x1+19+5.5 0 0 0 10 0 0 'Alt' 'Specify the altitude of expected point' alt", "-i 1 0 1 1 1 29.5x1+19+7 2 2 1 1 1 'Width ' 'Specifies the region width' wsize", "-i 1 0 1 1 1 29.5x1+19+8 2 2 1 1 1 'Height ' 'Specifies the region height' hsize", "-O 1 0 0 1 0 1 56x1+0+9.5 ' ' 'ASCII Output' 'Formatted ASCII output file' f", "-O 1 0 0 1 0 1 56x1+0+10.5 ' ' 'Output Image' 'Resulting output data object' o_img", "-b +0+4.5 'Specify Expected Point:' b1", "-b +0+7.5 'Specify Region Size:' b4", "-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,22,}; 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,0,}; /* * array of uis filenames and line numbers for error messaging */ char *clui_filenames[] = { "$MATCHING/objects/kroutine/klgmaxrel/uis/klgmaxrel.pane", }; /* * UIS struct for clui */ uis_struct clui_uis_spec = { clui_uis, 22, clui_file_lookup, clui_line_lookup, clui_filenames, 1, 512};