home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / x / xprism.zip / xprism / src / xprism3 / main_util.c < prev    next >
C/C++ Source or Header  |  1992-09-30  |  74KB  |  2,292 lines

  1.  /*
  2.   * Khoros: $Id: main_util.c,v 1.3 1992/03/20 22:41:22 dkhoros Exp $
  3.   */
  4.  
  5. #if !defined(lint) && !defined(SABER)
  6. static char rcsid[] = "Khoros: $Id: main_util.c,v 1.3 1992/03/20 22:41:22 dkhoros Exp $";
  7. #endif
  8.  
  9.  /*
  10.   * $Log: main_util.c,v $
  11.  * Revision 1.3  1992/03/20  22:41:22  dkhoros
  12.  * VirtualPatch5
  13.  *
  14.   */ 
  15.  
  16.  
  17. /*
  18.  *----------------------------------------------------------------------
  19.  *
  20.  * Copyright 1990, University of New Mexico.  All rights reserved.
  21.  
  22.  * Permission to copy and modify this software and its documen-
  23.  * tation only for internal use in your organization is hereby
  24.  * granted, provided that this notice is retained thereon and
  25.  * on all copies.  UNM makes no representations as too the sui-
  26.  * tability and operability of this software for any purpose.
  27.  * It is provided "as is" without express or implied warranty.
  28.  * 
  29.  * UNM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  30.  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FIT-
  31.  * NESS.  IN NO EVENT SHALL UNM BE LIABLE FOR ANY SPECIAL,
  32.  * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY OTHER DAMAGES WHAT-
  33.  * SOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
  34.  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
  35.  * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PER-
  36.  * FORMANCE OF THIS SOFTWARE.
  37.  * 
  38.  * No other rights, including for example, the right to redis-
  39.  * tribute this software and its documentation or the right to
  40.  * prepare derivative works, are granted unless specifically
  41.  * provided in a separate license agreement.
  42.  *---------------------------------------------------------------------
  43.  */
  44.  
  45. #include "unmcopyright.h"     /* Copyright 1990 by UNM */
  46. #include "xprism3.h"    
  47.  
  48.  
  49. /* >>>>>>>>>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  50.    >>>>                                                       <<<<
  51.    >>>>        file name: main_util.c
  52.    >>>>              
  53.    >>>>   description: This file contains utilities for the 
  54.    >>>>            commandline integration.
  55.    >>>>              
  56.    >>>>      routines:
  57.    >>>>            usage
  58.    >>>>            init_xprism3
  59.    >>>>            set_global_outdir
  60.    >>>>            set_global_indir
  61.    >>>>            find_machtype_index
  62.    >>>>              
  63.    >>>> modifications:
  64.    >>>>                                                       <<<<
  65.    >>>>>>>>>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< */
  66.  
  67.  
  68.  
  69. /**************************************************************
  70. *
  71. * MODULE NAME: usage
  72. *
  73. *     PURPOSE: This module is used for printing out the usage for the
  74. *           program.
  75. *
  76. *       INPUT: none
  77. *
  78. *      OUTPUT: prints out the usage for the program
  79. *
  80. * CALLED FROM: VGetArgs
  81. *
  82. * MODIFIED: Sept 10, 1990 by John M. Salas
  83. *        - modified to reflect new command line.
  84. *
  85. **************************************************************/
  86.  
  87. void
  88. usage()
  89. {
  90.   (void) fprintf(stderr, "%s:\n", program);
  91.   (void) fprintf(stderr, "\n");
  92.   (void) fprintf(stderr, "\t3D plotting package\n");
  93.  
  94.   (void) fprintf(stderr, "\n\t[-update] File update time\n");
  95.   (void) fprintf(stderr, "\n\t[-fn] Specifies the font for %s\n", program);
  96.   (void) fprintf(stderr, "\n\t[-jr filename.jp] Creates a journal recording of %s", program);
  97.   (void) fprintf(stderr, "\n\t[-jp filename.jp] Executes a journal playback of %s", program);
  98.   (void) fprintf(stderr, "\n\t[-V] Gives the version number for %s\n", program);
  99.   (void) fprintf(stderr, "\t[-U] Gives the usage for %s\n", program);
  100.   (void) fprintf(stderr, "\t[-P] prompts for command line options\n");
  101.   (void) fprintf(stderr, "\t[-a [file1]] use %s.ans or file1 as the option answer file\n", program);
  102.   (void) fprintf(stderr, "\t[-A [file2]] creates the answer file called %s.ans or file\n", program);
  103.  
  104.   (void) fprintf(stderr,"\n\n\tXprism3 has too many other command line ");
  105.   (void) fprintf(stderr,"arguments to list\n\tthem all here.  When the [-P] ");
  106.   (void) fprintf(stderr,"is used a subset of the all\n\tthe possible command");
  107.   (void) fprintf(stderr,"line inputs are actually requested\n\tfrom the user.\n\n");
  108.   (void) fprintf(stderr,"\tThis subset will prompt for multiple plots, ");
  109.   (void) fprintf(stderr,"either files\n\tor functions, and the plotting ");
  110.   (void) fprintf(stderr,"characteristics for the plots,\n\te.g. line type, ");
  111.   (void) fprintf(stderr,"marker type, begin plotting point, etc.\n\n\tAfter all ");
  112.   (void) fprintf(stderr,"the plots and their characteristics are entered\n\t");
  113.   (void) fprintf(stderr,"the plot window is created and the plots drawn.\n\n");
  114.   (void) fprintf(stderr,"\tFor more information on how to use xprism3 and all ");
  115.   (void) fprintf(stderr,"the possible\n\tcommand line options either look in the");
  116.   (void) fprintf(stderr," file\n\t KHOROS_HOME/doc/xprism/xprism3/help/Start_Up, or ");
  117.   (void) fprintf(stderr,"do a vman xprism3\n");
  118.  
  119. }
  120.  
  121. /**************************************************************
  122. *
  123. * MODULE NAME: init_xprism3
  124. *
  125. *     PURPOSE: This module is used to get the command line arguments
  126. *           needed to run this program.
  127. *
  128. *       INPUT: none
  129. *
  130. *    NOTE: uses the global pointer to the arguments structure.
  131. *
  132. *      OUTPUT: none (Just gets the command line options)
  133. *
  134. * CALLED FROM: main() and run_answer_file()
  135. *
  136. * MODIFIED: Aug 9, 1990 by John M. Salas
  137. *        - Renamed routine from VGetArgs() to init_xprism3()
  138. *               - Restructured code so that all parameters needed to
  139. *          reconstruct a plot are available to the user on the
  140. *          command line or in a answer file.  The defaults not
  141. *          specified by the user are set and are passed in the
  142. *          structure xprism3_args.
  143. *        - Selected a limited set of parameters that the user
  144. *          is prompted for when prompting requested.
  145. *        - Modified the routine so that it could be called
  146. *          from the forms.
  147. *               - Modified the -np option so that an answer file
  148. *                 and extra input files can be specified.
  149. *
  150. **************************************************************/
  151.  
  152. #include "xprism.h"
  153.  
  154. init_xprism3(called_by_main, fd, xprism3_args)
  155. xprism3_struct *xprism3_args;
  156. int called_by_main, fd;
  157.  
  158. {
  159.  
  160.   xp3_area_info_struct *area_info;
  161.   xp3_plot_info_struct *plot_info;
  162.  
  163.   char    answer_file[LENGTH],
  164.     default_machine_name[LENGTH],
  165.     *form_filestring,
  166.     key[20],
  167.     prompt[512],
  168.     temp[512],
  169.     temp1[512],
  170.     string[10];
  171.  
  172.   int    default_value_int,
  173.     default_maximum_int,
  174.       xdefault_value_int,
  175.     xdefault_maximum_int,
  176.       ydefault_value_int,
  177.     ydefault_maximum_int,
  178.     error,
  179.     fd_ansr = -1,
  180.     find_machtype_index(),
  181.     have_plot_in_area,
  182.     i,
  183.     file_type,
  184.     need_plot,
  185.     no_plot_specified,
  186.     query,
  187.     plot_area,
  188.     plot_number,
  189.     plotting_file,
  190.     plotting_function,
  191.     prompting = FALSE,
  192.     specified,
  193.     rsrl_specified,
  194.     specified_line_type,
  195.     specified_marker_type,
  196.     specified_color_type,
  197.     value;
  198.  
  199.   float    dummy, beg, end;
  200.  
  201.   if ( called_by_main )
  202.   {
  203.     vgparml(fd_ansr, "-V", "noprompt", &query, 0, 0, &error);
  204.     if (error == 0)
  205.     {    /* findout information about this routine */
  206.       fprintf(stderr, "\n%s: Version: %d.%d\n\n", RELEASE_NAME, 
  207.                               RELEASE_MAJOR, RELEASE_MINOR);
  208.       khoros_close();
  209.     }
  210.     vgparml(fd_ansr, "-U", "noprompt", &query, 0, 0, &error);
  211.     if (error == 0)
  212.     {    /* findout information about this routine */
  213.       usage();
  214.       exit(1);
  215.     }
  216.  
  217.     vgparml(fd_ansr, "-P","noprompt", &query, 0, 0, &error);
  218.     if (error == 0)
  219.     {
  220.       prompting = TRUE;
  221.     }
  222.  
  223.     vgparms(fd_ansr, "-a","noprompt", answer_file, 0, 0, &error);
  224.     if (error == 0)
  225.     {
  226.       if (VStrlen(answer_file) == 0)
  227.       (void) sprintf(answer_file, "%s.ans", program);
  228.       while (fd_ansr < 0)
  229.       {
  230.         if ((fd_ansr = open(answer_file, O_RDONLY, 0666)) == -1)
  231.         {    /* an error trying to open answer file */
  232.       (void) fprintf(stderr, 
  233.                  "%s: Can not open answer file \"%s\"\nRe-enter: ",
  234.                  program, answer_file);
  235.       (void) gets(answer_file);
  236.       if (VStrlen(answer_file) == 0)
  237.       {
  238.         (void) sprintf(answer_file, "%s.ans", program);
  239.       }
  240.         }
  241.       }
  242.     }
  243.   }
  244.   else /* called by forms */
  245.   {
  246.     fd_ansr = fd;
  247.   }
  248.  
  249.   specified = vget_float(fd_ansr, prompting, "-update", "noprompt",
  250.              &xprism3_args->update, 1.0,
  251.              1.0, 1.0);
  252. /*
  253.   Get an alternate user interface description file ...
  254. */
  255.   specified = vget_infile(fd_ansr, prompting, "-form",
  256.               "noprompt", &form_filestring);
  257.  
  258. /*
  259.    ... if form specified expand ...
  260. */
  261.   if (specified)
  262.   {
  263.     xprism3_args->form_file = vfullpath(form_filestring, NULL, NULL);
  264.     free(form_filestring);
  265.     form_filestring = NULL;
  266.   }
  267. /*
  268.    ... if no form specified use the default form.
  269. */
  270.   else
  271.   {
  272.     xprism3_args->form_file = VStrcpy(XPRISM3_FORM);
  273.   }
  274.  
  275. /*
  276.    Set up global defaults.  Starting with the input and output paths ...
  277. */
  278.   specified = vget_string(fd_ansr, prompting, "-indir", "noprompt",
  279.               &xprism3_args->indir, INDIR);
  280.  
  281.   specified = vget_string(fd_ansr, prompting, "-outdir", "noprompt",
  282.               &xprism3_args->outdir, OUTDIR);
  283.  
  284. /*
  285.    ... get annotation files ...
  286. */
  287.   specified = vget_string(fd_ansr, prompting, "-anin", "noprompt", 
  288.               &xprism3_args->annotation_in_file, NULL);
  289.    
  290.   specified = vget_string(fd_ansr, prompting, "-anout", "noprompt",
  291.               &xprism3_args->annotation_out_file, NULL);
  292.  
  293. /*
  294.    ... get output files ...
  295. */
  296.   specified = vget_string(fd_ansr,prompting, "-expifile", "noprompt",
  297.               &xprism3_args->explicit_imagefile, NULL);
  298.  
  299.   specified = vget_string(fd_ansr,prompting, "-impifile", "noprompt",
  300.               &xprism3_args->implicit_imagefile, NULL);
  301.  
  302.   specified = vget_string(fd_ansr,prompting, "-cmifile", "noprompt",
  303.               &xprism3_args->colormap_imagefile, NULL);
  304.  
  305.   specified = vget_string(fd_ansr,prompting, "-sdumpfile", "noprompt",
  306.               &xprism3_args->screendump_file, NULL);
  307.  
  308.   specified = vget_string(fd_ansr,prompting, "-outans", "noprompt",
  309.               &xprism3_args->output_answer_file, NULL);
  310.  
  311. /*
  312.    ... postscript output ...
  313. */
  314.   specified = vget_string(fd_ansr,prompting, "-pslp", "noprompt", 
  315.               &xprism3_args->postscr_printer, NULL);
  316.  
  317.   specified = vget_string(fd_ansr,prompting, "-psfile", "noprompt", 
  318.               &xprism3_args->postscr_file, NULL);
  319.  
  320.   specified = vget_logic(fd_ansr, prompting, "-psflush", "noprompt",
  321.              &xprism3_args->postscr_flush, FLUSH_PRINTEROUTPUT);
  322.  
  323.   specified = vget_logic(fd_ansr, prompting, "-psinvert", "noprompt",
  324.              &xprism3_args->postscr_invert, INVERT_PRINTEROUTPUT);
  325.  
  326.   specified = vget_logic(fd_ansr, prompting, "-pslandscape", "noprompt",
  327.                          &xprism3_args->postscr_landscape,
  328.              LANDSCAPE_PRINTEROUTPUT);
  329.  
  330.   specified = vget_logic(fd_ansr, prompting, "-psmono", "noprompt",
  331.                          &xprism3_args->postscr_mono,
  332.              MONO_PRINTEROUTPUT);
  333.  
  334.   specified = vget_float(fd_ansr, prompting, "-psw", "noprompt",
  335.              &xprism3_args->postscr_width, PRINTEROUT_WIDTH,
  336.              PRINTEROUT_WIDTH_MIN, PRINTEROUT_WIDTH_MAX);
  337.  
  338.   specified = vget_float(fd_ansr, prompting, "-psh", "noprompt",
  339.              &xprism3_args->postscr_height, PRINTEROUT_HEIGHT,
  340.              PRINTEROUT_HEIGHT_MIN, PRINTEROUT_HEIGHT_MAX);
  341.  
  342.   specified = vget_float(fd_ansr, prompting, "-psx", "noprompt",
  343.              &xprism3_args->postscr_xoffset, PRINTEROUT_XOFFSET,
  344.              PRINTEROUT_OFFSET_MIN, PRINTEROUT_OFFSET_MAX);
  345.  
  346.   specified = vget_float(fd_ansr, prompting, "-psy", "noprompt",
  347.              &xprism3_args->postscr_yoffset, PRINTEROUT_YOFFSET,
  348.              PRINTEROUT_OFFSET_MIN, PRINTEROUT_OFFSET_MAX);
  349.  
  350.   specified = vget_int(fd_ansr, prompting, "-psotype", "noprompt", 
  351.                &xprism3_args->postscr_output_type, VECTOR_OUTPUT,
  352.                VECTOR_OUTPUT, RASTER_OUTPUT);
  353.  
  354. /*
  355.    ... imagen output ...
  356. */
  357.   specified = vget_string(fd_ansr,prompting, "-imlp", "noprompt", 
  358.               &xprism3_args->imagen_printer, NULL);
  359.  
  360.   specified = vget_string(fd_ansr,prompting, "-imfile", "noprompt", 
  361.               &xprism3_args->imagen_file, NULL);
  362.  
  363.   specified = vget_logic(fd_ansr, prompting, "-imflush", "noprompt",
  364.              &xprism3_args->imagen_flush, FLUSH_PRINTEROUTPUT);
  365.  
  366.   specified = vget_logic(fd_ansr, prompting, "-iminvert", "noprompt",
  367.              &xprism3_args->imagen_invert, INVERT_PRINTEROUTPUT);
  368.  
  369.   specified = vget_float(fd_ansr, prompting, "-imw", "noprompt",
  370.              &xprism3_args->imagen_width, PRINTEROUT_WIDTH,
  371.              PRINTEROUT_WIDTH_MIN, PRINTEROUT_WIDTH_MAX);
  372.  
  373.   specified = vget_float(fd_ansr, prompting, "-imh", "noprompt",
  374.              &(xprism3_args->imagen_height), PRINTEROUT_HEIGHT,
  375.              PRINTEROUT_HEIGHT_MIN, PRINTEROUT_HEIGHT_MAX);
  376.  
  377.   specified = vget_float(fd_ansr, prompting, "-imx", "noprompt",
  378.              &(xprism3_args->imagen_xoffset), PRINTEROUT_XOFFSET,
  379.              PRINTEROUT_OFFSET_MIN, PRINTEROUT_OFFSET_MAX);
  380.  
  381.   specified = vget_float(fd_ansr, prompting, "-imy", "noprompt",
  382.              &(xprism3_args->imagen_yoffset), PRINTEROUT_YOFFSET,
  383.              PRINTEROUT_OFFSET_MIN, PRINTEROUT_OFFSET_MAX);
  384.  
  385.   specified = vget_int(fd_ansr, prompting, "-imotype", "noprompt", 
  386.                &(xprism3_args->imagen_output_type), VECTOR_OUTPUT,
  387.                VECTOR_OUTPUT, RASTER_OUTPUT);
  388.  
  389. /*
  390.    ... HPGL output ...
  391. */
  392.   specified = vget_string(fd_ansr,prompting, "-hpgllp", "noprompt", 
  393.               &xprism3_args->hpgl_printer, NULL);
  394.  
  395.   specified = vget_string(fd_ansr,prompting, "-hpglfile", "noprompt", 
  396.               &xprism3_args->hpgl_file, NULL);
  397.  
  398.   specified = vget_logic(fd_ansr, prompting, "-hpglflush", "noprompt",
  399.              &xprism3_args->hpgl_flush, FLUSH_PRINTEROUTPUT);
  400.  
  401.   specified = vget_logic(fd_ansr, prompting, "-hpgllandscape", "noprompt",
  402.              &xprism3_args->hpgl_landscape, LANDSCAPE_PRINTEROUTPUT);
  403.  
  404.   specified = vget_float(fd_ansr, prompting, "-hpglw", "noprompt",
  405.              &xprism3_args->hpgl_width, PRINTEROUT_WIDTH,
  406.              PRINTEROUT_WIDTH_MIN, PRINTEROUT_WIDTH_MAX);
  407.  
  408.   specified = vget_float(fd_ansr, prompting, "-hpglh", "noprompt",
  409.              &(xprism3_args->hpgl_height), PRINTEROUT_HEIGHT,
  410.              PRINTEROUT_HEIGHT_MIN, PRINTEROUT_HEIGHT_MAX);
  411.  
  412.   specified = vget_float(fd_ansr, prompting, "-hpglx", "noprompt",
  413.              &(xprism3_args->hpgl_xoffset), PRINTEROUT_XOFFSET,
  414.              PRINTEROUT_OFFSET_MIN, PRINTEROUT_OFFSET_MAX);
  415.  
  416.   specified = vget_float(fd_ansr, prompting, "-hpgly", "noprompt",
  417.              &(xprism3_args->hpgl_yoffset), PRINTEROUT_YOFFSET,
  418.              PRINTEROUT_OFFSET_MIN, PRINTEROUT_OFFSET_MAX);
  419.  
  420. /*
  421.    ... LN03 output ...
  422. */
  423.   specified = vget_string(fd_ansr,prompting, "-ln03lp", "noprompt", 
  424.               &xprism3_args->ln03_printer, NULL);
  425.  
  426.   specified = vget_string(fd_ansr,prompting, "-ln03file", "noprompt", 
  427.               &xprism3_args->ln03_file, NULL);
  428.  
  429.   specified = vget_logic(fd_ansr, prompting, "-ln03invert", "noprompt",
  430.              &xprism3_args->ln03_invert, INVERT_PRINTEROUTPUT);
  431.  
  432. /*
  433.    ... set the labeled maximum, minimum, and major interval values ...
  434. */
  435.   xprism3_args->numerical_relabel_specified_xmin =
  436.     vget_float(fd_ansr, prompting, "-xlmin", "noprompt",
  437.            &xprism3_args->xlabel_min, -1.0, 0.0, 0.0);
  438.  
  439.   xprism3_args->numerical_relabel_specified_xmax =
  440.     vget_float(fd_ansr, prompting, "-xlmax", "noprompt",
  441.            &xprism3_args->xlabel_max,
  442.            xprism3_args->xlabel_min + 2.0,
  443.            xprism3_args->xlabel_min, XV_MAXFLOAT);
  444.  
  445.   xprism3_args->numerical_relabel_specified_xint =
  446.     vget_float(fd_ansr, prompting, "-xlint", "noprompt",
  447.            &xprism3_args->major_xlabel_int, 0.5, 0.0, 0.0);
  448.  
  449.   xprism3_args->numerical_relabel_specified_ymin =
  450.     vget_float(fd_ansr, prompting, "-ylmin", "noprompt",
  451.            &xprism3_args->ylabel_min, -1.0, 0.0, 0.0);
  452.  
  453.   xprism3_args->numerical_relabel_specified_ymax =
  454.     vget_float(fd_ansr, prompting, "-ylmax", "noprompt",
  455.            &xprism3_args->ylabel_max, xprism3_args->ylabel_min + 2.0,
  456.            xprism3_args->ylabel_min, XV_MAXFLOAT);
  457.  
  458.   xprism3_args->numerical_relabel_specified_yint =
  459.     vget_float(fd_ansr, prompting, "-ylint", "noprompt",
  460.            &xprism3_args->major_ylabel_int, 0.5, 0.0, 0.0);
  461.  
  462.  
  463.   xprism3_args->numerical_relabel_specified_zmin =
  464.     vget_float(fd_ansr, prompting, "-zlmin", "noprompt",
  465.            &xprism3_args->zlabel_min, -1.0, 0.0, 0.0);
  466.  
  467.   xprism3_args->numerical_relabel_specified_zmax =
  468.     vget_float(fd_ansr, prompting, "-zlmax", "noprompt",
  469.            &xprism3_args->zlabel_max, xprism3_args->zlabel_min + 2.0,
  470.            xprism3_args->zlabel_min, XV_MAXFLOAT);
  471.  
  472.   xprism3_args->numerical_relabel_specified_zint =
  473.     vget_float(fd_ansr, prompting, "-zlint", "noprompt",
  474.            &xprism3_args->major_zlabel_int, 0.5, 0.0, 0.0);
  475. /* 
  476.    ... set the actual maximum, minimum, and major interval values ...
  477. */
  478.   xprism3_args->numerical_scale_specified_xmin =
  479.     vget_float(fd_ansr, prompting, "-xsmin", "noprompt",
  480.            &xprism3_args->xmin, -1.0, 0.0, 0.0);
  481.  
  482.   xprism3_args->numerical_scale_specified_xmax =
  483.     vget_float(fd_ansr, prompting, "-xsmax", "noprompt",
  484.            &xprism3_args->xmax, xprism3_args->xmin + 2.0,
  485.            xprism3_args->xmin, XV_MAXFLOAT);
  486.  
  487.   xprism3_args->numerical_scale_specified_xint =
  488.     vget_float(fd_ansr, prompting, "-xsint", "noprompt",
  489.            &xprism3_args->major_xint, 0.5, 0.0, 0.0);
  490.  
  491.   xprism3_args->numerical_scale_specified_ymin =
  492.     vget_float(fd_ansr, prompting, "-ysmin", "noprompt",
  493.            &xprism3_args->ymin, -1.0, 0.0, 0.0);
  494.  
  495.   xprism3_args->numerical_scale_specified_ymax =
  496.     vget_float(fd_ansr, prompting, "-ysmax", "noprompt",
  497.            &xprism3_args->ymax, xprism3_args->ymin + 2.0,
  498.            xprism3_args->ymin, XV_MAXFLOAT);
  499.  
  500.   xprism3_args->numerical_scale_specified_yint =
  501.     vget_float(fd_ansr, prompting, "-ysint", "noprompt",
  502.            &xprism3_args->major_yint, 0.5, 0.0, 0.0);
  503.  
  504.   xprism3_args->numerical_scale_specified_zmin =
  505.     vget_float(fd_ansr, prompting, "-zsmin", "noprompt",
  506.            &xprism3_args->zmin, -1.0, 0.0, 0.0);
  507.  
  508.   xprism3_args->numerical_scale_specified_zmax =
  509.     vget_float(fd_ansr, prompting, "-zsmax", "noprompt",
  510.            &xprism3_args->zmax, xprism3_args->zmin + 2.0,
  511.            xprism3_args->zmin, XV_MAXFLOAT);
  512.  
  513.   xprism3_args->numerical_scale_specified_zint =
  514.     vget_float(fd_ansr, prompting, "-zsint", "noprompt",
  515.            &xprism3_args->major_zint, 0.5, 0.0, 0.0);
  516.  
  517. /*
  518.    ... set the begin, end, and step size for the data to be plotted ...
  519. */
  520.   specified = vget_int(fd_ansr, prompting, "-xb", "noprompt",
  521.                &xprism3_args->xbegin_point, 0, 1, 1);
  522.  
  523.   specified = vget_int(fd_ansr, prompting, "-xe", "noprompt",
  524.                &xprism3_args->xend_point, 0,
  525.                xprism3_args->xbegin_point, XV_MAXLINT);
  526.  
  527.   if ( xprism3_args->xend_point == 0 )
  528.   {
  529.     default_maximum_int = XV_MAXLINT - xprism3_args->xbegin_point;
  530.   }
  531.   else
  532.   {
  533.     default_maximum_int = xprism3_args->xend_point - xprism3_args->xbegin_point;
  534.   }
  535.  
  536.   if ( default_maximum_int == 0 )
  537.   {
  538.     default_maximum_int = 1;
  539.   }
  540.  
  541.   specified = vget_int(fd_ansr, prompting, "-xs", "noprompt",
  542.                &xprism3_args->xstep_size, 1, 1,
  543.                default_maximum_int);
  544.  
  545.  
  546.   specified = vget_int(fd_ansr, prompting, "-yb", "noprompt",
  547.                &xprism3_args->ybegin_point, 0, 1, 1);
  548.  
  549.   specified = vget_int(fd_ansr, prompting, "-ye", "noprompt",
  550.                &xprism3_args->yend_point, 0,
  551.                xprism3_args->ybegin_point, XV_MAXLINT);
  552.  
  553.   if ( xprism3_args->yend_point == 0 )
  554.   {
  555.     default_maximum_int = XV_MAXLINT - xprism3_args->ybegin_point;
  556.   }
  557.   else
  558.   {
  559.     default_maximum_int = xprism3_args->yend_point - xprism3_args->ybegin_point;
  560.   }
  561.  
  562.   if ( default_maximum_int == 0 )
  563.   {
  564.     default_maximum_int = 1;
  565.   }
  566.  
  567.   specified = vget_int(fd_ansr, prompting, "-ys", "noprompt",
  568.                &xprism3_args->ystep_size, 1, 1,
  569.                default_maximum_int);
  570.  
  571. /*
  572.    ... set function minimum, maximum, and number of points ...
  573. */
  574.   specified = vget_string(fd_ansr, prompting, "-fxmin", "noprompt",
  575.              &xprism3_args->func_xmin, "-1.0");
  576.  
  577.   specified = vget_string(fd_ansr, prompting, "-fxmax", "noprompt",
  578.              &xprism3_args->func_xmax, "1.0");
  579.  
  580.   specified = vget_string(fd_ansr, prompting, "-fxpts", "noprompt",
  581.                &xprism3_args->func_xptnum, "40");
  582.  
  583.  
  584.   specified = vget_string(fd_ansr, prompting, "-fymin", "noprompt",
  585.              &xprism3_args->func_ymin, "-1.0");
  586.  
  587.   specified = vget_string(fd_ansr, prompting, "-fymax", "noprompt",
  588.              &xprism3_args->func_ymax, "1.0");
  589.  
  590.   specified = vget_string(fd_ansr, prompting, "-fypts", "noprompt",
  591.                &xprism3_args->func_yptnum, "40");
  592.  
  593. /*
  594.    ... set information about the data and machine ...
  595. */
  596.   specified = vget_int(fd_ansr, prompting, "-df", "noprompt",
  597.                &xprism3_args->data_format, XYZ_TRIPLES-1, MIN_DATA_FORMAT,
  598.                MAX_DATA_FORMAT);
  599.  
  600.   specified = vget_int(fd_ansr, prompting, "-dt", "noprompt",
  601.                &xprism3_args->data_type, MAX_DATA_TYPE, MIN_DATA_TYPE,
  602.                MAX_DATA_TYPE);
  603.  
  604.   (void) machtype(default_machine_name);
  605.   default_value_int = find_machtype_index(default_machine_name);
  606.   specified = vget_int(fd_ansr, prompting, "-mach", "noprompt",
  607.                &xprism3_args->machine_type, default_value_int,
  608.                0, NUMBER_MACHINES - 1);
  609.  
  610.   specified = vget_logic(fd_ansr, prompting, "-active", "noprompt",
  611.              &xprism3_args->active, TRUE);
  612.  
  613. /*
  614.    ... plot type ...
  615. */
  616.   specified = vget_int(fd_ansr, prompting, "-pt", "noprompt",
  617.                &xprism3_args->plot_type, MIN_PLOT_TYPE, MIN_PLOT_TYPE,
  618.                MAX_PLOT_TYPE);
  619.  
  620. /*
  621.    ... which data band to plot ...
  622. */
  623.   specified = vget_int(fd_ansr, prompting, "-band", "noprompt",
  624.                &xprism3_args->whichband, -1, 0, 0);
  625.  
  626. /*
  627.    ... if input file is an image and complex 
  628.     then which complex type to use
  629. */
  630.   specified = vget_int(fd_ansr, prompting, "-cmplx", "noprompt",
  631.                &xprism3_args->cmplx, 0, 0, 4);
  632.  
  633.  
  634. /*
  635.    ... need to know the number of rows for the plot
  636. */
  637.   specified = vget_int(fd_ansr, prompting, "-rows", "noprompt",
  638.                &xprism3_args->rows, 1, 2, 2);
  639.  
  640. /*
  641.  
  642.    ... marker type ...
  643. */
  644.   specified_marker_type = vget_int(fd_ansr, prompting, "-mt",
  645.                    "noprompt", &xprism3_args->marker_type,
  646.                    MIN_MARKER_TYPE, MIN_MARKER_TYPE,
  647.                    MAX_MARKER_TYPE);
  648.  
  649. /*
  650.    ... line type ...
  651. */
  652.   specified_line_type = vget_int(fd_ansr, prompting, "-lt", "noprompt",
  653.                  &xprism3_args->line_type, MIN_LINE_TYPE,
  654.                  MIN_LINE_TYPE, MAX_LINE_TYPE);
  655.  
  656. /*
  657.    ... color for plot ...
  658. */
  659.   specified_color_type = vget_int(fd_ansr, prompting, "-pc", "noprompt",
  660.                   &xprism3_args->plot_color, MIN_COLOR_TYPE,
  661.                   MIN_COLOR_TYPE, MAX_COLOR_TYPE);
  662.  
  663. /*
  664.    ... default color for axes, grid, labels, etc. ...
  665. */
  666.   specified = vget_int(fd_ansr, prompting, "-color", "noprompt",
  667.                &xprism3_args->color, MIN_COLOR_TYPE,
  668.                MIN_COLOR_TYPE, MAX_COLOR_TYPE);
  669.  
  670. /*
  671.    ... color for title ...
  672. */
  673.   specified = vget_int(fd_ansr, prompting, "-tc", "noprompt",
  674.                &xprism3_args->title_color, xprism3_args->color,
  675.                MIN_COLOR_TYPE, MAX_COLOR_TYPE);
  676.  
  677. /*
  678.    ... color for axes label ...
  679. */
  680.   specified = vget_int(fd_ansr, prompting, "-xalc", "noprompt",
  681.                &xprism3_args->xaxis_label_color, xprism3_args->color,
  682.                MIN_COLOR_TYPE, MAX_COLOR_TYPE);
  683.  
  684.   specified = vget_int(fd_ansr, prompting, "-yalc", "noprompt",
  685.                &xprism3_args->yaxis_label_color, xprism3_args->color,
  686.                MIN_COLOR_TYPE, MAX_COLOR_TYPE);
  687.  
  688.   specified = vget_int(fd_ansr, prompting, "-zalc", "noprompt",
  689.                &xprism3_args->zaxis_label_color, xprism3_args->color,
  690.                MIN_COLOR_TYPE, MAX_COLOR_TYPE);
  691.  
  692. /*
  693.    ... color for axes ...
  694. */
  695.   specified = vget_int(fd_ansr, prompting, "-xac", "noprompt",
  696.                &xprism3_args->xaxis_color, xprism3_args->color,
  697.                MIN_COLOR_TYPE, MAX_COLOR_TYPE);
  698.  
  699.   specified = vget_int(fd_ansr, prompting, "-yac", "noprompt",
  700.                &xprism3_args->yaxis_color, xprism3_args->color,
  701.                MIN_COLOR_TYPE, MAX_COLOR_TYPE);
  702.  
  703.   specified = vget_int(fd_ansr, prompting, "-zac", "noprompt",
  704.                &xprism3_args->zaxis_color, xprism3_args->color,
  705.                MIN_COLOR_TYPE, MAX_COLOR_TYPE);
  706.  
  707. /*
  708.    ... color for numerical labels for axes ...
  709. */
  710.   specified = vget_int(fd_ansr, prompting, "-nxac", "noprompt",
  711.                &xprism3_args->num_xaxis_color,
  712.                xprism3_args->color,
  713.                MIN_COLOR_TYPE, MAX_COLOR_TYPE);
  714.  
  715.   specified = vget_int(fd_ansr, prompting, "-nyac", "noprompt",
  716.                &xprism3_args->num_yaxis_color,
  717.                xprism3_args->color,
  718.                MIN_COLOR_TYPE, MAX_COLOR_TYPE);
  719.  
  720.   specified = vget_int(fd_ansr, prompting, "-nzac", "noprompt",
  721.                &xprism3_args->num_zaxis_color,
  722.                xprism3_args->color,
  723.                MIN_COLOR_TYPE, MAX_COLOR_TYPE);
  724.  
  725. /*
  726.    ... color for grid ...
  727. */
  728.   specified = vget_int(fd_ansr, prompting, "-gc", "noprompt",
  729.                &xprism3_args->grid_color, xprism3_args->color,
  730.                MIN_COLOR_TYPE, MAX_COLOR_TYPE);
  731.  
  732. /*
  733.    ... color for legend ...
  734. */
  735.   specified = vget_int(fd_ansr, prompting, "-lc", "noprompt",
  736.                &xprism3_args->legend_color, xprism3_args->color,
  737.                MIN_COLOR_TYPE, MAX_COLOR_TYPE);
  738.  
  739. /*
  740.    ... title of plot ...
  741. */
  742.   specified = vget_string(fd_ansr, prompting, "-title", "noprompt",
  743.               &xprism3_args->title, "Xprism Plot");
  744.  
  745. /*
  746.    ... x axis label ...
  747. */
  748.   specified = vget_string(fd_ansr,prompting, "-xaxis", "noprompt",
  749.               &xprism3_args->xaxis, "X Axis");
  750.  
  751. /*
  752.    ... y axis label ...
  753. */
  754.   specified = vget_string(fd_ansr,prompting, "-yaxis", "noprompt",
  755.               &xprism3_args->yaxis, "Y Axis");
  756.  
  757. /*
  758.    ... z axis label ...
  759. */
  760.   specified = vget_string(fd_ansr,prompting, "-zaxis", "noprompt",
  761.               &xprism3_args->zaxis, "Z Axis");
  762.  
  763.  
  764. /*
  765.    ... fonts ...
  766. */
  767.   specified = vget_int(fd_ansr, prompting, "-font", "noprompt",
  768.                &xprism3_args->font, MIN_FONT_TYPE, MIN_FONT_TYPE,
  769.                MAX_FONT_TYPE);
  770.  
  771.   specified = vget_int(fd_ansr, prompting, "-xaf", "noprompt", 
  772.                &xprism3_args->xaxis_font, xprism3_args->font,
  773.                MIN_FONT_TYPE, MAX_FONT_TYPE);
  774.  
  775.   specified = vget_int(fd_ansr, prompting, "-yaf", "noprompt", 
  776.                &xprism3_args->yaxis_font, xprism3_args->font,
  777.                MIN_FONT_TYPE, MAX_FONT_TYPE);
  778.  
  779.   specified = vget_int(fd_ansr, prompting, "-zaf", "noprompt", 
  780.                &xprism3_args->zaxis_font, xprism3_args->font,
  781.                MIN_FONT_TYPE, MAX_FONT_TYPE);
  782.  
  783.   specified = vget_int(fd_ansr, prompting, "-numf", "noprompt", 
  784.                &xprism3_args->numbers_font, xprism3_args->font,
  785.                MIN_FONT_TYPE, MAX_FONT_TYPE);
  786.  
  787.   specified = vget_int(fd_ansr, prompting, "-lf", "noprompt", 
  788.                &xprism3_args->legend_font, xprism3_args->font,
  789.                MIN_FONT_TYPE, MAX_FONT_TYPE);
  790.  
  791.   specified = vget_int(fd_ansr, prompting, "-tf", "noprompt", 
  792.                &xprism3_args->title_font, xprism3_args->font,
  793.                MIN_FONT_TYPE, MAX_FONT_TYPE);
  794.  
  795. /*
  796.    ... plot area viewing parameters ...
  797. */
  798.   specified = vget_logic(fd_ansr, prompting, "-legend", "noprompt", 
  799.              &xprism3_args->legend, TRUE);
  800.  
  801.   specified = vget_logic(fd_ansr, prompting, "-box", "noprompt", 
  802.              &xprism3_args->box, FALSE);
  803.  
  804.   specified = vget_logic(fd_ansr, prompting, "-numlabels", "noprompt", 
  805.              &xprism3_args->numerical_labels, TRUE);
  806.  
  807.   specified = vget_logic(fd_ansr, prompting, "-axes", "noprompt", 
  808.              &xprism3_args->axes, TRUE);
  809.  
  810.   specified = vget_logic(fd_ansr, prompting, "-grid", "noprompt", 
  811.              &xprism3_args->grid, FALSE);
  812.  
  813.   specified = vget_logic(fd_ansr, prompting, "-autoscale", "noprompt", 
  814.              &xprism3_args->auto_scale, FALSE);
  815.  
  816.   specified = vget_logic(fd_ansr, prompting, "-clrls", "noprompt", 
  817.              &xprism3_args->clear_labels, FALSE);
  818.  
  819.   rsrl_specified = vget_int(fd_ansr, prompting, "-rsrl", "noprompt", 
  820.                &xprism3_args->rescale_relabel, RESCALE, RESCALE,
  821.                RELABEL);
  822.  
  823. /* set the perspective */
  824.  
  825.    specified = vget_float(fd_ansr, prompting, "-alpha", "noprompt",
  826.            &xprism3_args->alpha, 63.7, 0.0, 360.0);
  827.  
  828.    specified = vget_float(fd_ansr, prompting, "-theta", "noprompt",
  829.            &xprism3_args->theta, 31.8, 0.0, 360.0);
  830.  
  831.    specified = vget_float(fd_ansr, prompting, "-eyedist", "noprompt",
  832.            &xprism3_args->eyedist, 8.0, 0.0, 100.0);
  833.  
  834.    specified = vget_float(fd_ansr, prompting, "-viewdist", "noprompt",
  835.            &xprism3_args->viewdist, 16.0, 0.0, 100.0);
  836.  
  837.  
  838. /* all axes scale code is commented out until it can be reworked
  839.  
  840.   specified = vget_int(fd_ansr, prompting, "-xscale", "noprompt", 
  841.                &xprism3_args->scale.x, LINEAR, LINEAR, LN);
  842.  
  843.   specified = vget_int(fd_ansr, prompting, "-yscale", "noprompt", 
  844.                &xprism3_args->scale.y, LINEAR, LINEAR, LN);
  845.  
  846.   specified = vget_int(fd_ansr, prompting, "-zscale", "noprompt", 
  847.                &xprism3_args->scale.z, LINEAR, LINEAR, LN);
  848. */
  849.  
  850.   specified = vget_int(fd_ansr, prompting, "-xtics", "noprompt", 
  851.                &xprism3_args->x_tics, MIN_TICS, MIN_TICS, MAX_TICS);
  852.  
  853.   specified = vget_int(fd_ansr, prompting, "-ytics", "noprompt", 
  854.                &xprism3_args->y_tics, MIN_TICS, MIN_TICS, MAX_TICS);
  855.  
  856.   specified = vget_int(fd_ansr, prompting, "-ztics", "noprompt", 
  857.                &xprism3_args->z_tics, MIN_TICS, MIN_TICS, MAX_TICS);
  858.  
  859. /*
  860.    Code to support multiple plot areas.  When ever the time is right or
  861.    the sun rises in the western sky in a bright purple haze with orange
  862.    fringe and a ;^) on its face.
  863.  
  864.   number_areas_flg = vget_int(fd_ansr, prompting, "-na",
  865.                   "Number of plot areas - ",
  866.                   &xprism3_args->number_areas, 0, 1, MAX_AREAS);
  867.  
  868. */
  869.  
  870.   xprism3_args->number_areas = 1;
  871.   xprism3_args->plots_specified = FALSE;
  872.  
  873.   for ( plot_area = 1 ; plot_area <= xprism3_args->number_areas ; plot_area++ )
  874.   {
  875.  
  876.     area_info =
  877.     xprism3_args->area_info[plot_area - 1] = (xp3_area_info_struct *)
  878.              calloc((unsigned)1, (unsigned)sizeof(xp3_area_info_struct));
  879.  
  880. /*
  881.    set the labeled maximum, minimum, and major interval values
  882. */
  883.     sprintf(key,"-xlmin%d", plot_area);
  884.     area_info->numerical_relabel_specified_xmin =
  885.     vget_float(fd_ansr, prompting, key, "noprompt", &area_info->xlabel_min,
  886.            xprism3_args->xlabel_min, 0.0, 0.0);
  887.  
  888.     sprintf(key,"-xlmax%d", plot_area);
  889.     area_info->numerical_relabel_specified_xmax =
  890.     vget_float(fd_ansr, prompting, key, "noprompt", &area_info->xlabel_max,
  891.            xprism3_args->xlabel_max, area_info->xlabel_min,
  892.            XV_MAXFLOAT);
  893.  
  894.     sprintf(key,"-xlint%d", plot_area);
  895.     area_info->numerical_relabel_specified_xint =
  896.     vget_float(fd_ansr, prompting, key, "noprompt",
  897.            &area_info->major_xlabel_int, xprism3_args->major_xlabel_int,
  898.            0.0, 0.0);
  899.  
  900.     sprintf(key,"-ylmin%d", plot_area);
  901.     area_info->numerical_relabel_specified_ymin =
  902.     vget_float(fd_ansr, prompting, key, "noprompt", &area_info->ylabel_min,
  903.            xprism3_args->ylabel_min, 0.0, 0.0);
  904.  
  905.     sprintf(key,"-ylmax%d", plot_area);
  906.     area_info->numerical_relabel_specified_ymax =
  907.     vget_float(fd_ansr, prompting, key, "noprompt", &area_info->ylabel_max,
  908.            xprism3_args->ylabel_max, area_info->ylabel_min,
  909.            XV_MAXFLOAT);
  910.  
  911.     sprintf(key,"-ylint%d", plot_area);
  912.     area_info->numerical_relabel_specified_yint =
  913.     vget_float(fd_ansr, prompting, key, "noprompt",
  914.                    &area_info->major_ylabel_int, xprism3_args->major_ylabel_int,
  915.            0.0, 0.0);
  916.  
  917.     sprintf(key,"-zlmin%d", plot_area);
  918.     area_info->numerical_relabel_specified_zmin =
  919.     vget_float(fd_ansr, prompting, key, "noprompt", &area_info->zlabel_min,
  920.            xprism3_args->zlabel_min, 0.0, 0.0);
  921.  
  922.     sprintf(key,"-zlmax%d", plot_area);
  923.     area_info->numerical_relabel_specified_zmax =
  924.     vget_float(fd_ansr, prompting, key, "noprompt", &area_info->zlabel_max,
  925.            xprism3_args->zlabel_max, area_info->zlabel_min,
  926.            XV_MAXFLOAT);
  927.  
  928.     sprintf(key,"-zlint%d", plot_area);
  929.     area_info->numerical_relabel_specified_zint =
  930.     vget_float(fd_ansr, prompting, key, "noprompt",
  931.                    &area_info->major_zlabel_int, xprism3_args->major_zlabel_int,
  932.            0.0, 0.0);
  933.  
  934.  
  935.  
  936.     if ( xprism3_args->numerical_relabel_specified_xmin && 
  937.      ! area_info->numerical_relabel_specified_xmin )
  938.     {
  939.       area_info->numerical_relabel_specified_xmin = TRUE;
  940.     }
  941.  
  942.     if ( xprism3_args->numerical_relabel_specified_xmax && 
  943.      ! area_info->numerical_relabel_specified_xmax )
  944.     {
  945.       area_info->numerical_relabel_specified_xmax = TRUE;
  946.     }
  947.  
  948.     if ( xprism3_args->numerical_relabel_specified_xint && 
  949.      ! area_info->numerical_relabel_specified_xint )
  950.     {
  951.       area_info->numerical_relabel_specified_xint = TRUE;
  952.     }
  953.  
  954.     if ( xprism3_args->numerical_relabel_specified_ymin && 
  955.      ! area_info->numerical_relabel_specified_ymin )
  956.     {
  957.       area_info->numerical_relabel_specified_ymin = TRUE;
  958.     }
  959.  
  960.     if ( xprism3_args->numerical_relabel_specified_ymax && 
  961.      ! area_info->numerical_relabel_specified_ymax )
  962.     {
  963.       area_info->numerical_relabel_specified_ymax = TRUE;
  964.     }
  965.  
  966.     if ( xprism3_args->numerical_relabel_specified_yint && 
  967.      ! area_info->numerical_relabel_specified_yint )
  968.     {
  969.       area_info->numerical_relabel_specified_yint = TRUE;
  970.     }
  971.  
  972.     if ( xprism3_args->numerical_relabel_specified_zmin && 
  973.      ! area_info->numerical_relabel_specified_zmin )
  974.     {
  975.       area_info->numerical_relabel_specified_zmin = TRUE;
  976.     }
  977.  
  978.     if ( xprism3_args->numerical_relabel_specified_zmax && 
  979.      ! area_info->numerical_relabel_specified_zmax )
  980.     {
  981.       area_info->numerical_relabel_specified_zmax = TRUE;
  982.     }
  983.  
  984.     if ( xprism3_args->numerical_relabel_specified_zint && 
  985.      ! area_info->numerical_relabel_specified_zint )
  986.     {
  987.       area_info->numerical_relabel_specified_zint = TRUE;
  988.     }
  989.  
  990. /* check to see min, max, and int are specified. Check to see
  991.    if one is specified without all being specified.
  992. */
  993.  
  994.     if ( ( area_info->numerical_relabel_specified_xmin |
  995.            area_info->numerical_relabel_specified_xmax |
  996.            area_info->numerical_relabel_specified_xint ) &&
  997.      ! ( area_info->numerical_relabel_specified_xmin &
  998.          area_info->numerical_relabel_specified_xmax &
  999.          area_info->numerical_relabel_specified_xint ) )
  1000.     {
  1001.      fprintf(stderr,"WARNING: Need to specify minimum, maximum and interval\n");
  1002.      fprintf(stderr,"         for changing the labels on the x-axis.\n");
  1003.     }
  1004.  
  1005.     if ( ( area_info->numerical_relabel_specified_ymin |
  1006.            area_info->numerical_relabel_specified_ymax |
  1007.            area_info->numerical_relabel_specified_yint ) &&
  1008.          ! ( area_info->numerical_relabel_specified_ymin &
  1009.              area_info->numerical_relabel_specified_ymax &
  1010.              area_info->numerical_relabel_specified_yint ) )
  1011.     {
  1012.      fprintf(stderr,"WARNING: Need to specify minimum, maximum and interval\n");
  1013.      fprintf(stderr,"         for changing the labels on the y-axis.\n");
  1014.     }
  1015.  
  1016.     if ( ( area_info->numerical_relabel_specified_zmin |
  1017.            area_info->numerical_relabel_specified_zmax |
  1018.            area_info->numerical_relabel_specified_zint ) &&
  1019.          ! ( area_info->numerical_relabel_specified_zmin &
  1020.              area_info->numerical_relabel_specified_zmax &
  1021.              area_info->numerical_relabel_specified_zint ) )
  1022.     {
  1023.      fprintf(stderr,"WARNING: Need to specify minimum, maximum and interval\n");
  1024.      fprintf(stderr,"         for changing the labels on the z-axis.\n");
  1025.     }
  1026.  
  1027.  
  1028. /* 
  1029.    set the actual maximum, minimum, and major interval values
  1030. */
  1031.     sprintf(key,"-xsmin%d", plot_area);
  1032.     area_info->numerical_scale_specified_xmin =
  1033.     vget_float(fd_ansr, prompting, key, "noprompt", &area_info->xmin,
  1034.            xprism3_args->xmin, 0.0, 0.0);
  1035.  
  1036.     sprintf(key,"-xsmax%d", plot_area);
  1037.     area_info->numerical_scale_specified_xmax =
  1038.     vget_float(fd_ansr, prompting, key, "noprompt", &area_info->xmax,
  1039.            xprism3_args->xmax, area_info->xmin, XV_MAXFLOAT);
  1040.  
  1041.     sprintf(key,"-xsint%d", plot_area);
  1042.     area_info->numerical_scale_specified_xint =
  1043.     vget_float(fd_ansr, prompting, key, "noprompt", &area_info->major_xint,
  1044.            xprism3_args->major_xint, 0.0, 0.0);
  1045.  
  1046.     sprintf(key,"-ysmin%d", plot_area);
  1047.     area_info->numerical_scale_specified_ymin =
  1048.     vget_float(fd_ansr, prompting, key, "noprompt", &area_info->ymin,
  1049.            xprism3_args->ymin, 0.0, 0.0);
  1050.  
  1051.     sprintf(key,"-ysmax%d", plot_area);
  1052.     area_info->numerical_scale_specified_ymax =
  1053.     vget_float(fd_ansr, prompting, key, "noprompt", &area_info->ymax,
  1054.            xprism3_args->ymax, area_info->ymin, XV_MAXFLOAT);
  1055.  
  1056.     sprintf(key,"-ysint%d", plot_area);
  1057.     area_info->numerical_scale_specified_yint =
  1058.     vget_float(fd_ansr, prompting, key, "noprompt", &area_info->major_yint,
  1059.            xprism3_args->major_yint, 0.0, 0.0);
  1060.  
  1061.     sprintf(key,"-zsmin%d", plot_area);
  1062.     area_info->numerical_scale_specified_zmin =
  1063.     vget_float(fd_ansr, prompting, key, "noprompt", &area_info->zmin,
  1064.            xprism3_args->zmin, 0.0, 0.0);
  1065.  
  1066.     sprintf(key,"-zsmax%d", plot_area);
  1067.     area_info->numerical_scale_specified_zmax =
  1068.     vget_float(fd_ansr, prompting, key, "noprompt", &area_info->zmax,
  1069.            xprism3_args->zmax, area_info->zmin, XV_MAXFLOAT);
  1070.  
  1071.     sprintf(key,"-zsint%d", plot_area);
  1072.     area_info->numerical_scale_specified_zint =
  1073.     vget_float(fd_ansr, prompting, key, "noprompt", &area_info->major_zint,
  1074.            xprism3_args->major_zint, 0.0, 0.0);
  1075.  
  1076.     if ( xprism3_args->numerical_scale_specified_xmin && 
  1077.      ! area_info->numerical_scale_specified_xmin )
  1078.     {
  1079.       area_info->numerical_scale_specified_xmin = TRUE;
  1080.     }
  1081.  
  1082.     if ( xprism3_args->numerical_scale_specified_xmax && 
  1083.      ! area_info->numerical_scale_specified_xmax )
  1084.     {
  1085.       area_info->numerical_scale_specified_xmax = TRUE;
  1086.     }
  1087.  
  1088.     if ( xprism3_args->numerical_scale_specified_xint && 
  1089.      ! area_info->numerical_scale_specified_xint )
  1090.     {
  1091.       area_info->numerical_scale_specified_xint = TRUE;
  1092.     }
  1093.  
  1094.     if ( xprism3_args->numerical_scale_specified_ymin && 
  1095.      ! area_info->numerical_scale_specified_ymin )
  1096.     {
  1097.       area_info->numerical_scale_specified_ymin = TRUE;
  1098.     }
  1099.  
  1100.     if ( xprism3_args->numerical_scale_specified_ymax && 
  1101.      ! area_info->numerical_scale_specified_ymax )
  1102.     {
  1103.       area_info->numerical_scale_specified_ymax = TRUE;
  1104.     }
  1105.  
  1106.     if ( xprism3_args->numerical_scale_specified_yint && 
  1107.      ! area_info->numerical_scale_specified_yint )
  1108.     {
  1109.       area_info->numerical_scale_specified_yint = TRUE;
  1110.     }
  1111.  
  1112.     if ( xprism3_args->numerical_scale_specified_zmin && 
  1113.      ! area_info->numerical_scale_specified_zmin )
  1114.     {
  1115.       area_info->numerical_scale_specified_zmin = TRUE;
  1116.     }
  1117.  
  1118.     if ( xprism3_args->numerical_scale_specified_zmax && 
  1119.      ! area_info->numerical_scale_specified_zmax )
  1120.     {
  1121.       area_info->numerical_scale_specified_zmax = TRUE;
  1122.     }
  1123.  
  1124.     if ( xprism3_args->numerical_scale_specified_zint && 
  1125.      ! area_info->numerical_scale_specified_zint )
  1126.     {
  1127.       area_info->numerical_scale_specified_zint = TRUE;
  1128.     }
  1129.  
  1130.     if ( ( area_info->numerical_scale_specified_xmin |
  1131.            area_info->numerical_scale_specified_xmax |
  1132.            area_info->numerical_scale_specified_xint ) && 
  1133.      ! ( area_info->numerical_scale_specified_xmin &
  1134.          area_info->numerical_scale_specified_xmax &
  1135.          area_info->numerical_scale_specified_xint ) )
  1136.     {
  1137.      fprintf(stderr,"WARNING: Need to specify minimum, maximum and interval\n");
  1138.      fprintf(stderr,"         for changing the scale of the x-axis.\n");
  1139.     }
  1140.  
  1141.     if ( ( area_info->numerical_scale_specified_ymin |
  1142.            area_info->numerical_scale_specified_ymax |
  1143.            area_info->numerical_scale_specified_yint ) &&
  1144.      ! ( area_info->numerical_scale_specified_ymin &
  1145.          area_info->numerical_scale_specified_ymax &
  1146.          area_info->numerical_scale_specified_yint ) )
  1147.     {
  1148.      fprintf(stderr,"WARNING: Need to specify minimum, maximum and interval\n");
  1149.      fprintf(stderr,"         for changing the scale of the y-axis.\n");
  1150.     }
  1151.  
  1152.     if ( ( area_info->numerical_scale_specified_zmin |
  1153.            area_info->numerical_scale_specified_zmax |
  1154.            area_info->numerical_scale_specified_zint ) &&
  1155.      ! ( area_info->numerical_scale_specified_zmin &
  1156.          area_info->numerical_scale_specified_zmax &
  1157.          area_info->numerical_scale_specified_zint ) )
  1158.     {
  1159.      fprintf(stderr,"WARNING: Need to specify minimum, maximum and interval\n");
  1160.      fprintf(stderr,"         for changing the scale of the z-axis.\n");
  1161.     }
  1162.  
  1163.     sprintf(key,"-fxmin%d", plot_area);
  1164.     specified = vget_string(fd_ansr, prompting, key, "noprompt",
  1165.                &area_info->func_xmin, xprism3_args->func_xmin);
  1166.  
  1167.     sprintf(key,"-fxmax%d", plot_area);
  1168.     specified = vget_string(fd_ansr, prompting, key, "noprompt",
  1169.                &area_info->func_xmax, xprism3_args->func_xmax);
  1170.  
  1171.     sprintf(key,"-fxpts%d", plot_area);
  1172.     specified = vget_string(fd_ansr, prompting, key, "noprompt",
  1173.              &area_info->func_xptnum, xprism3_args->func_xptnum);
  1174.  
  1175.     sprintf(key,"-fymin%d", plot_area);
  1176.     specified = vget_string(fd_ansr, prompting, key, "noprompt",
  1177.                &area_info->func_ymin, xprism3_args->func_ymin);
  1178.  
  1179.     sprintf(key,"-fymax%d", plot_area);
  1180.     specified = vget_string(fd_ansr, prompting, key, "noprompt",
  1181.                &area_info->func_ymax, xprism3_args->func_ymax);
  1182.  
  1183.     sprintf(key,"-fypts%d", plot_area);
  1184.     specified = vget_string(fd_ansr, prompting, key, "noprompt",
  1185.              &area_info->func_yptnum, xprism3_args->func_yptnum);
  1186.  
  1187.     sprintf(key,"-df%d", plot_area);
  1188.     specified = vget_int(fd_ansr, prompting, key, "noprompt",
  1189.              &area_info->data_format,
  1190.              xprism3_args->data_format, MIN_DATA_FORMAT,
  1191.              MAX_DATA_FORMAT);
  1192.  
  1193.     sprintf(key,"-dt%d", plot_area);
  1194.     specified = vget_int(fd_ansr, prompting, key, "noprompt",
  1195.              &area_info->data_type,
  1196.              xprism3_args->data_type, MIN_DATA_TYPE,
  1197.              MAX_DATA_TYPE);
  1198.  
  1199.     sprintf(key,"-mach%d", plot_area);
  1200.     specified = vget_int(fd_ansr, prompting, key, "noprompt",
  1201.              &area_info->machine_type,
  1202.              xprism3_args->machine_type, 0,
  1203.              NUMBER_MACHINES - 1);
  1204.  
  1205.     sprintf(key,"-active%d", plot_area);
  1206.     specified = vget_logic(fd_ansr, prompting, key, "noprompt",
  1207.                &area_info->active, xprism3_args->active);
  1208.  
  1209.     sprintf(key,"-xb%d", plot_area);
  1210.     specified = vget_int(fd_ansr, prompting, key, "noprompt",
  1211.              &area_info->xbegin_point, xprism3_args->xbegin_point,
  1212.              1, 1);
  1213.  
  1214.     if ( xprism3_args->xend_point < area_info->xbegin_point )
  1215.     {
  1216.       default_value_int = 0;
  1217.     }
  1218.     else
  1219.     {
  1220.       default_value_int = xprism3_args->xend_point;
  1221.     }
  1222.     sprintf(key,"-xe%d", plot_area);
  1223.     specified = vget_int(fd_ansr, prompting, key, "noprompt",
  1224.              &area_info->xend_point, default_value_int,
  1225.              area_info->xbegin_point, XV_MAXLINT);
  1226.  
  1227.     if ( area_info->xend_point == 0 )
  1228.     {
  1229.       default_maximum_int = XV_MAXLINT - area_info->xbegin_point;
  1230.     }
  1231.     else
  1232.     {
  1233.       default_maximum_int = xprism3_args->xend_point - area_info->xbegin_point;
  1234.     }
  1235.  
  1236.     if ( default_maximum_int == 0 )
  1237.     {
  1238.       default_maximum_int = 1;
  1239.     }
  1240.  
  1241.     if ( default_maximum_int < xprism3_args->xstep_size )
  1242.     {
  1243.       default_value_int = 0;
  1244.     }
  1245.     else
  1246.     {
  1247.       default_value_int = xprism3_args->xstep_size;
  1248.     }
  1249.  
  1250.     sprintf(key,"-xs%d", plot_area);
  1251.     specified = vget_int(fd_ansr, prompting, key, "noprompt",
  1252.              &area_info->xstep_size, default_value_int, 1,
  1253.              default_maximum_int);
  1254.  
  1255.  
  1256.     sprintf(key,"-yb%d", plot_area);
  1257.     specified = vget_int(fd_ansr, prompting, key, "noprompt",
  1258.              &area_info->ybegin_point, xprism3_args->ybegin_point,
  1259.              1, 1);
  1260.  
  1261.     if ( xprism3_args->yend_point < area_info->ybegin_point )
  1262.     {
  1263.       default_value_int = 0;
  1264.     }
  1265.     else
  1266.     {
  1267.       default_value_int = xprism3_args->yend_point;
  1268.     }
  1269.     sprintf(key,"-ye%d", plot_area);
  1270.     specified = vget_int(fd_ansr, prompting, key, "noprompt",
  1271.              &area_info->yend_point, default_value_int,
  1272.              area_info->ybegin_point, XV_MAXLINT);
  1273.  
  1274.     if ( area_info->yend_point == 0 )
  1275.     {
  1276.       default_maximum_int = XV_MAXLINT - area_info->ybegin_point;
  1277.     }
  1278.     else
  1279.     {
  1280.       default_maximum_int = xprism3_args->yend_point - area_info->ybegin_point;
  1281.     }
  1282.  
  1283.     if ( default_maximum_int == 0 )
  1284.     {
  1285.       default_maximum_int = 1;
  1286.     }
  1287.  
  1288.     if ( default_maximum_int < xprism3_args->ystep_size )
  1289.     {
  1290.       default_value_int = 0;
  1291.     }
  1292.     else
  1293.     {
  1294.       default_value_int = xprism3_args->ystep_size;
  1295.     }
  1296.  
  1297.     sprintf(key,"-ys%d", plot_area);
  1298.     specified = vget_int(fd_ansr, prompting, key, "noprompt",
  1299.              &area_info->ystep_size, default_value_int, 1,
  1300.              default_maximum_int);
  1301.  
  1302. /*
  1303.   plot type
  1304. */
  1305.     sprintf(key,"-pt%d", plot_area);
  1306.     specified = vget_int(fd_ansr, prompting, key, "noprompt",
  1307.              &area_info->plot_type, xprism3_args->plot_type,
  1308.              MIN_PLOT_TYPE, MAX_PLOT_TYPE);
  1309.  
  1310. /*
  1311.    ... which data band to plot ...
  1312. */
  1313.   sprintf(key,"-band%d", plot_area);
  1314.   specified = vget_int(fd_ansr, prompting, key, "noprompt",
  1315.                &area_info->whichband, xprism3_args->whichband, 0, 0);
  1316.  
  1317. /*
  1318.    ... if input file is an image and complex 
  1319.     then which complex type to use
  1320. */
  1321.   sprintf(key,"-cmplx%d", plot_area);
  1322.   specified = vget_int(fd_ansr, prompting, key, "noprompt",
  1323.                &area_info->cmplx, xprism3_args->cmplx, 0, 4);
  1324.  
  1325. /*
  1326.    ... set the number of rows
  1327. */
  1328.   sprintf(key,"-rows%d", plot_area);
  1329.   specified = vget_int(fd_ansr, prompting, key, "noprompt",
  1330.                &area_info->rows, xprism3_args->rows, 0, 4);
  1331.  
  1332. /*
  1333.   marker type
  1334. */
  1335.     sprintf(key,"-mt%d", plot_area);
  1336.     specified = vget_int(fd_ansr, prompting, key, "noprompt",
  1337.              &area_info->marker_type, xprism3_args->marker_type,
  1338.              MIN_MARKER_TYPE, MAX_MARKER_TYPE);
  1339.     specified_marker_type |= specified;
  1340.  
  1341. /*
  1342.   line type
  1343. */
  1344.     sprintf(key,"-lt%d", plot_area);
  1345.     specified = vget_int(fd_ansr, prompting, key, "noprompt",
  1346.              &area_info->line_type, xprism3_args->line_type,
  1347.              MIN_LINE_TYPE, MAX_LINE_TYPE);
  1348.     specified_line_type |= specified;
  1349.  
  1350. /*
  1351.    color for plot
  1352. */
  1353.     sprintf(key,"-pc%d", plot_area);
  1354.     specified = vget_int(fd_ansr, prompting, key, "noprompt",
  1355.              &area_info->plot_color, xprism3_args->plot_color,
  1356.              MIN_COLOR_TYPE, MAX_COLOR_TYPE);
  1357.     specified_color_type |= specified;
  1358.  
  1359. /*
  1360.   color for labels
  1361. */
  1362.     sprintf(key,"-color%d", plot_area);
  1363.     specified = vget_int(fd_ansr, prompting, key, "noprompt",
  1364.              &area_info->color, xprism3_args->color,
  1365.              MIN_COLOR_TYPE, MAX_COLOR_TYPE);
  1366.  
  1367. /*
  1368.    ... color for title ...
  1369. */
  1370.     sprintf(key,"-tc%d", plot_area);
  1371.     specified = vget_int(fd_ansr, prompting, key, "noprompt",
  1372.              &area_info->title_color, area_info->color,
  1373.              MIN_COLOR_TYPE, MAX_COLOR_TYPE);
  1374.  
  1375. /*
  1376.    color for axes label
  1377. */
  1378.     sprintf(key,"-xalc%d", plot_area);
  1379.     specified = vget_int(fd_ansr, prompting, key, "noprompt",
  1380.              &area_info->xaxis_label_color,
  1381.              area_info->xaxis_label_color,
  1382.              MIN_COLOR_TYPE, MAX_COLOR_TYPE);
  1383.  
  1384.     sprintf(key,"-yalc%d", plot_area);
  1385.     specified = vget_int(fd_ansr, prompting, key, "noprompt",
  1386.              &area_info->yaxis_label_color,
  1387.              area_info->yaxis_label_color,
  1388.              MIN_COLOR_TYPE, MAX_COLOR_TYPE);
  1389.  
  1390.     sprintf(key,"-zalc%d", plot_area);
  1391.     specified = vget_int(fd_ansr, prompting, key, "noprompt",
  1392.              &area_info->zaxis_label_color,
  1393.              area_info->zaxis_label_color,
  1394.              MIN_COLOR_TYPE, MAX_COLOR_TYPE);
  1395.  
  1396. /*
  1397.    color for axes
  1398. */
  1399.     sprintf(key,"-xac%d", plot_area);
  1400.     specified = vget_int(fd_ansr, prompting, key, "noprompt",
  1401.              &area_info->xaxis_color, area_info->xaxis_color,
  1402.              MIN_COLOR_TYPE, MAX_COLOR_TYPE);
  1403.  
  1404.     sprintf(key,"-yac%d", plot_area);
  1405.     specified = vget_int(fd_ansr, prompting, key, "noprompt",
  1406.              &area_info->yaxis_color, area_info->yaxis_color,
  1407.              MIN_COLOR_TYPE, MAX_COLOR_TYPE);
  1408.  
  1409.     sprintf(key,"-zac%d", plot_area);
  1410.     specified = vget_int(fd_ansr, prompting, key, "noprompt",
  1411.              &area_info->zaxis_color, area_info->zaxis_color,
  1412.              MIN_COLOR_TYPE, MAX_COLOR_TYPE);
  1413.  
  1414. /*
  1415.    ... color for numerical labels for axes ...
  1416. */
  1417.     sprintf(key,"-nxac%d", plot_area);
  1418.     specified = vget_int(fd_ansr, prompting, key, "noprompt",
  1419.                  &area_info->num_xaxis_color,
  1420.                  area_info->color,
  1421.                  MIN_COLOR_TYPE, MAX_COLOR_TYPE);
  1422.  
  1423.     sprintf(key,"-nyac%d", plot_area);
  1424.     specified = vget_int(fd_ansr, prompting, key, "noprompt",
  1425.                  &area_info->num_yaxis_color,
  1426.                  area_info->color,
  1427.                  MIN_COLOR_TYPE, MAX_COLOR_TYPE);
  1428.  
  1429.     sprintf(key,"-nzac%d", plot_area);
  1430.     specified = vget_int(fd_ansr, prompting, key, "noprompt",
  1431.                  &area_info->num_zaxis_color,
  1432.                  area_info->color,
  1433.                  MIN_COLOR_TYPE, MAX_COLOR_TYPE);
  1434.  
  1435. /*
  1436.    color for grid
  1437. */
  1438.     sprintf(key,"-gc%d", plot_area);
  1439.     specified = vget_int(fd_ansr, prompting, key, "noprompt",
  1440.              &area_info->grid_color, area_info->grid_color,
  1441.              MIN_COLOR_TYPE, MAX_COLOR_TYPE);
  1442.  
  1443. /*
  1444.    ... color for legend ...
  1445. */
  1446.     sprintf(key,"-lc%d", plot_area);
  1447.     specified = vget_int(fd_ansr, prompting, key, "noprompt",
  1448.              &area_info->legend_color, area_info->color,
  1449.              MIN_COLOR_TYPE, MAX_COLOR_TYPE);
  1450.  
  1451. /*
  1452.    fonts
  1453. */
  1454.     sprintf(key,"-xaf%d", plot_area);
  1455.     specified = vget_int(fd_ansr, prompting, key, "noprompt", 
  1456.              &area_info->xaxis_font, xprism3_args->xaxis_font,
  1457.              MIN_FONT_TYPE, MAX_FONT_TYPE);
  1458.  
  1459.     sprintf(key,"-yaf%d", plot_area);
  1460.     specified = vget_int(fd_ansr, prompting, key, "noprompt", 
  1461.              &area_info->yaxis_font, xprism3_args->yaxis_font,
  1462.              MIN_FONT_TYPE, MAX_FONT_TYPE);
  1463.  
  1464.     sprintf(key,"-zaf%d", plot_area);
  1465.     specified = vget_int(fd_ansr, prompting, key, "noprompt", 
  1466.              &area_info->zaxis_font, xprism3_args->zaxis_font,
  1467.              MIN_FONT_TYPE, MAX_FONT_TYPE);
  1468.  
  1469.     sprintf(key,"-numf%d", plot_area);
  1470.     specified = vget_int(fd_ansr, prompting, key, "noprompt", 
  1471.              &area_info->numbers_font, xprism3_args->numbers_font,
  1472.              MIN_FONT_TYPE, MAX_FONT_TYPE);
  1473.  
  1474.     sprintf(key,"-lf%d", plot_area);
  1475.     specified = vget_int(fd_ansr, prompting, key, "noprompt", 
  1476.              &area_info->legend_font, xprism3_args->legend_font,
  1477.              MIN_FONT_TYPE, MAX_FONT_TYPE);
  1478.  
  1479.     sprintf(key,"-tf%d", plot_area);
  1480.     specified = vget_int(fd_ansr, prompting, key, "noprompt", 
  1481.                  &area_info->title_font, xprism3_args->title_font,
  1482.                  MIN_FONT_TYPE, MAX_FONT_TYPE);
  1483.  
  1484. /*
  1485.    plot area viewing parameters
  1486. */
  1487.     sprintf(key,"-legend%d", plot_area);
  1488.     specified = vget_logic(fd_ansr, prompting, key, "noprompt", 
  1489.                &area_info->legend, xprism3_args->legend);
  1490.  
  1491.     sprintf(key,"-box%d", plot_area);
  1492.     specified = vget_logic(fd_ansr, prompting, key, "noprompt", 
  1493.                &area_info->box, xprism3_args->box);
  1494.  
  1495.     sprintf(key,"-numlabels%d", plot_area);
  1496.     specified = vget_logic(fd_ansr, prompting, key, "noprompt", 
  1497.                &area_info->numerical_labels,
  1498.                xprism3_args->numerical_labels);
  1499.  
  1500.     sprintf(key,"-axes%d", plot_area);
  1501.     specified = vget_logic(fd_ansr, prompting, key, "noprompt", 
  1502.                &area_info->axes, xprism3_args->axes);
  1503.  
  1504.     sprintf(key,"-grid%d", plot_area);
  1505.     specified = vget_logic(fd_ansr, prompting, key, "noprompt", 
  1506.                &area_info->grid, xprism3_args->grid);
  1507.  
  1508.     sprintf(key,"-autoscale%d", plot_area);
  1509.     specified = vget_logic(fd_ansr, prompting, key, "noprompt", 
  1510.                &area_info->auto_scale,
  1511.                xprism3_args->auto_scale);
  1512.  
  1513.     sprintf(key,"-clrls%d", plot_area);
  1514.     specified = vget_logic(fd_ansr, prompting, key, "noprompt", 
  1515.                &area_info->clear_labels,
  1516.                xprism3_args->clear_labels);
  1517.  
  1518.     sprintf(key,"-rsrl%d", plot_area);
  1519.     rsrl_specified = vget_int(fd_ansr, prompting, key, "noprompt", 
  1520.              &area_info->rescale_relabel,
  1521.              xprism3_args->rescale_relabel, RESCALE, RELABEL);
  1522.  
  1523. /* set the perspective */
  1524.  
  1525.    sprintf(key,"-alpha%d", plot_area);
  1526.    specified = vget_float(fd_ansr, prompting, key, "noprompt",
  1527.            &area_info->alpha, xprism3_args->alpha, 0.0, 360.0);
  1528.  
  1529.    sprintf(key,"-theta%d", plot_area);
  1530.    specified = vget_float(fd_ansr, prompting, key, "noprompt",
  1531.            &area_info->theta, xprism3_args->theta, 0.0, 360.0);
  1532.  
  1533.    sprintf(key,"-eyedist%d", plot_area);
  1534.    specified = vget_float(fd_ansr, prompting, key, "noprompt",
  1535.            &area_info->eyedist, xprism3_args->eyedist, 0.0, 100.0);
  1536.  
  1537.    sprintf(key,"-viewdist%d", plot_area);
  1538.    specified = vget_float(fd_ansr, prompting, key, "noprompt",
  1539.            &area_info->viewdist, xprism3_args->viewdist, 0.0, 100.0);
  1540.  
  1541. /* all axes scale code is commented out until it can be reworked
  1542.     sprintf(key,"-xscale%d", plot_area);
  1543.     specified = vget_int(fd_ansr, prompting, key, "noprompt", 
  1544.              &area_info->scale.x, xprism3_args->scale.x,
  1545.              LINEAR, LN);
  1546.  
  1547.     sprintf(key,"-yscale%d", plot_area);
  1548.     specified = vget_int(fd_ansr, prompting, key, "noprompt", 
  1549.              &area_info->scale.y, xprism3_args->scale.y,
  1550.              LINEAR, LN);
  1551.  
  1552.     sprintf(key,"-zscale%d", plot_area);
  1553.     specified = vget_int(fd_ansr, prompting, key, "noprompt", 
  1554.              &area_info->scale.z, xprism3_args->scale.z,
  1555.              LINEAR, LN);
  1556. */
  1557.  
  1558.     sprintf(key,"-xtics%d", plot_area);
  1559.     specified = vget_int(fd_ansr, prompting, key, "noprompt", 
  1560.              &area_info->x_tics, xprism3_args->x_tics,
  1561.              MIN_TICS, MAX_TICS);
  1562.  
  1563.     sprintf(key,"-ytics%d", plot_area);
  1564.     specified = vget_int(fd_ansr, prompting, key, "noprompt", 
  1565.              &area_info->y_tics, xprism3_args->y_tics,
  1566.              MIN_TICS, MAX_TICS);
  1567.  
  1568.     sprintf(key,"-ztics%d", plot_area);
  1569.     specified = vget_int(fd_ansr, prompting, key, "noprompt", 
  1570.              &area_info->z_tics, xprism3_args->z_tics,
  1571.              MIN_TICS, MAX_TICS);
  1572.  
  1573. /*
  1574.    title of plot
  1575. */
  1576.     sprintf(key,"-title%d", plot_area);
  1577.     specified = vget_string(fd_ansr, prompting, key, "noprompt",
  1578.                 &area_info->title, xprism3_args->title);
  1579.  
  1580. /*
  1581.    x axis label
  1582. */
  1583.     sprintf(key,"-xaxis%d", plot_area);
  1584.     specified = vget_string(fd_ansr,prompting, key, "noprompt",
  1585.                 &area_info->xaxis, xprism3_args->xaxis);
  1586.  
  1587. /*
  1588.    y axis label
  1589. */
  1590.     sprintf(key,"-yaxis%d", plot_area);
  1591.     specified = vget_string(fd_ansr,prompting, key, "noprompt",
  1592.                 &area_info->yaxis, xprism3_args->yaxis);
  1593.  
  1594. /*
  1595.    z axis label
  1596. */
  1597.     sprintf(key,"-zaxis%d", plot_area);
  1598.     specified = vget_string(fd_ansr,prompting, key, "noprompt",
  1599.                 &area_info->zaxis, xprism3_args->zaxis);
  1600.  
  1601.  
  1602.     if (prompting)
  1603.     {
  1604.       fprintf(stderr, "\n\t----------------------------------------------\n");
  1605.       fprintf(stderr, "\tSpecify number of plots in area %d.\n", plot_area);
  1606.     }
  1607.  
  1608.     sprintf(key, "-np%d", plot_area);
  1609.     sprintf(prompt, "Enter: (%s) (int) (0) - ", key);
  1610.     specified = vget_int(fd_ansr, prompting, key, prompt,
  1611.              &area_info->number_plots, 0, 0, MAX_PLOTS);
  1612.  
  1613. /*
  1614.    Since xprism can be called from cantata we need to check for any
  1615.    input files and functions on the command line.  This will also allow
  1616.    answer files that have files and functions that are not declared in
  1617.    sequence, i.e. -i11, -i15, -i16 instead of -i11, -i12, -i13. 
  1618.    Also, this allows an answer file and other input files within
  1619.    Cantata and on the command line
  1620. */
  1621.     if ( area_info->number_plots == 0 && ! prompting)
  1622.     {
  1623.       area_info->number_plots = MAX_PLOTS;
  1624.     }
  1625.  
  1626.     have_plot_in_area = FALSE;
  1627.  
  1628.     for ( plot_number = 1 ; plot_number <= area_info->number_plots ;
  1629.       plot_number++ )
  1630.     {
  1631.  
  1632.       plot_info = area_info->plot_info[plot_number - 1] =
  1633.           (xp3_plot_info_struct *)
  1634.               calloc((unsigned)1, (unsigned)sizeof(xp3_plot_info_struct));
  1635.  
  1636.       need_plot = FALSE;
  1637.       no_plot_specified = FALSE;
  1638.  
  1639. /*
  1640.    If prompting continue asking for a file or function till one is
  1641.    specified.  If not prompting look for the information once.
  1642. */
  1643.       do
  1644.       {
  1645. /*
  1646.   Get the input data file ...
  1647. */
  1648.     if (prompting)
  1649.     {
  1650.       fprintf(stderr, "\n\t------------------------------------------\n");
  1651.       fprintf(stderr, "\tEnter file to be plotted --\n");
  1652.     }
  1653.  
  1654.     sprintf(key, "-i%d%d", plot_area, plot_number);
  1655.     sprintf(prompt, "Enter: (%s) (infile) input file %d - ",
  1656.         key, plot_number);
  1657.     plotting_file = vget_infile(fd_ansr, prompting, key, prompt,
  1658.                     &plot_info->i_file);
  1659.  
  1660. /*
  1661.   ... if no input file specified get a function ...
  1662. */
  1663.     if ( ! plotting_file )
  1664.     {
  1665.       if (prompting)
  1666.       {
  1667.       fprintf(stderr, "\n\t-------------------------------------------\n");
  1668.         fprintf(stderr, "\tEnter function to be plotted --\n");
  1669.       }
  1670.       sprintf(key,"-func%d%d", plot_area, plot_number);
  1671.       sprintf(prompt, "Enter: (%s) (string) 3D function %d - ",
  1672.           key, plot_number);
  1673.       specified = vget_string(fd_ansr,prompting, key, prompt,
  1674.                   &plot_info->func_str, NULL);
  1675.  
  1676.       if (plot_info->func_str != NULL)
  1677.       {
  1678.         plotting_function = TRUE;
  1679.         file_type = KEYB_FUN;
  1680.  
  1681.         if (prompting)
  1682.         {
  1683.     fprintf(stderr, "\n\t----------------------------------------------\n");
  1684.           fprintf(stderr, "\tEnter X & Y minimum, maximum, & number of points\n");
  1685.           fprintf(stderr, "\tfor function --\n");
  1686.         }
  1687.  
  1688.         sprintf(key,"-fxmin%d%d", plot_area, plot_number);
  1689.        sprintf(prompt,"Enter: (%s) (string) (%s) X minimum of function %d - ",
  1690.             key, area_info->func_xmin, plot_number);
  1691.         specified = vget_string(fd_ansr, prompting, key, prompt,
  1692.                    &plot_info->func_xmin, area_info->func_xmin);
  1693.  
  1694.         sprintf(key,"-fxmax%d%d", plot_area, plot_number);
  1695.        sprintf(prompt,"Enter: (%s) (string) (%s) X maximum of function %d - ",
  1696.             key, area_info->func_xmax, plot_number);
  1697.         specified = vget_string(fd_ansr, prompting, key, prompt,
  1698.                    &plot_info->func_xmax, area_info->func_xmax);
  1699.  
  1700.         sprintf(key,"-fxpts%d%d", plot_area, plot_number);
  1701.       sprintf(prompt,"Enter: (%s) (string) (%s) X # points in function %d - ",
  1702.             key, area_info->func_xptnum, plot_number);
  1703.         specified = vget_string(fd_ansr, prompting, key, prompt,
  1704.                  &plot_info->func_xptnum, area_info->func_xptnum);
  1705.  
  1706.         sprintf(key,"-fymin%d%d", plot_area, plot_number);
  1707.        sprintf(prompt,"Enter: (%s) (string) (%s) Y minimum of function %d - ",
  1708.             key, area_info->func_ymin, plot_number);
  1709.         specified = vget_string(fd_ansr, prompting, key, prompt,
  1710.                    &plot_info->func_ymin, area_info->func_ymin);
  1711.  
  1712.         sprintf(key,"-fymax%d%d", plot_area, plot_number);
  1713.        sprintf(prompt,"Enter: (%s) (string) (%s) Y maximum of function %d - ",
  1714.             key, area_info->func_ymax, plot_number);
  1715.         specified = vget_string(fd_ansr, prompting, key, prompt,
  1716.                    &plot_info->func_ymax, area_info->func_ymax);
  1717.  
  1718.         sprintf(key,"-fypts%d%d", plot_area, plot_number);
  1719.       sprintf(prompt,"Enter: (%s) (string) (%s) Y # points in function %d - ",
  1720.             key, area_info->func_yptnum, plot_number);
  1721.         specified = vget_string(fd_ansr, prompting, key, prompt,
  1722.                  &plot_info->func_yptnum, area_info->func_yptnum);
  1723.       }
  1724.       else
  1725.       {
  1726.         if (prompting)
  1727.         {
  1728.       fprintf(stderr,"\n\nNo file or function specified.  Please enter\n");
  1729.           fprintf(stderr,"either a file or function to plot.\n");
  1730.           need_plot = TRUE;
  1731.           plotting_function = FALSE;
  1732.         }
  1733.         else if ( ! prompting )
  1734.         {
  1735. free(xprism3_args->area_info[plot_area - 1]->plot_info[plot_number - 1]);
  1736.           xprism3_args->area_info[plot_area - 1]->plot_info[plot_number - 1]
  1737.         = NULL;
  1738.           no_plot_specified = TRUE;
  1739.         }
  1740.       }
  1741.     }
  1742.     else
  1743.     {
  1744.       file_type = get_file_type(plot_info->i_file);
  1745.  
  1746.       if ( file_type != XVIFF && file_type != ASCII_FUN )
  1747.       {
  1748.         if (prompting)
  1749.         {
  1750.         fprintf(stderr, "\n\t----------------------------------------------\n");
  1751. fprintf(stderr, "\tSpecify the number of rows for the data in file %s --\n\n",
  1752.               plot_info->i_file);
  1753.         }
  1754.  
  1755.         sprintf(key,"-rows%d%d", plot_area, plot_number);
  1756.         sprintf(prompt,"Enter: (%s) (int) (%d) - ",
  1757.             key, area_info->rows);
  1758.         specified = vget_int(fd_ansr, prompting, key, prompt,
  1759.                  &plot_info->rows, area_info->rows, 2, 2);
  1760.  
  1761.  
  1762.         if (prompting)
  1763.         {
  1764.         fprintf(stderr, "\n\t----------------------------------------------\n");
  1765. fprintf(stderr, "\tSpecify data and machine information for file %s --\n\n",
  1766.               plot_info->i_file);
  1767.           fprintf(stderr, "\tSpecify DATA FORMATS --\n");
  1768.           fprintf(stderr, "\t1: XYZ Triplets       2: Z only\n");
  1769.         }
  1770.  
  1771.         sprintf(key,"-df%d%d", plot_area, plot_number);
  1772.         sprintf(prompt,"Enter: (%s) (int) (%d: %s) - ",
  1773.             key, area_info->data_format,
  1774.             data_format_names[area_info->data_format - 1]);
  1775.         specified = vget_int(fd_ansr, prompting, key, prompt,
  1776.                  &plot_info->data_format,
  1777.                  area_info->data_format, MIN_DATA_FORMAT,
  1778.                  MAX_DATA_FORMAT);
  1779.  
  1780.         if( file_type != ASCII_DATA )
  1781.         {
  1782.           if (prompting)
  1783.           {
  1784.         fprintf(stderr, "\tSpecify DATA TYPE --\n");
  1785.         fprintf(stderr, "\t1: Byte           2: Short\n");
  1786.         fprintf(stderr, "\t3: Integer        4: Float\n");
  1787.           }
  1788.           sprintf(key,"-dt%d%d", plot_area, plot_number);
  1789.         sprintf(prompt,"Enter: (%s) (int) (%d: %s) - ",
  1790.             key, area_info->data_type,
  1791.             data_type_names[area_info->data_type - 1]);
  1792.           specified = vget_int(fd_ansr, prompting, key, prompt,
  1793.                    &plot_info->data_type,
  1794.                    area_info->data_type, MIN_DATA_TYPE,
  1795.                    MAX_DATA_TYPE);
  1796.  
  1797.           if (prompting)
  1798.           {
  1799.         fprintf(stderr, "\tSpecify MACHINE TYPE --\n");
  1800.         for ( i = 0 ; i < MAX_MACHINE_TYPE ; i++ )
  1801.         {
  1802.           fprintf(stderr, "\t%d: %s\n", i, machine_defs[i].hosttype);
  1803.         }
  1804.           }
  1805.           sprintf(key,"-mach%d%d", plot_area, plot_number);
  1806.           sprintf(prompt,"Enter: (%s) (int) (%d: %s) - ",
  1807.               key, area_info->machine_type,
  1808.               machine_defs[i].hosttype);
  1809.           specified = vget_int(fd_ansr, prompting, key, prompt,
  1810.                    &plot_info->machine_type,
  1811.                    area_info->machine_type, MIN_MACHINE_TYPE,
  1812.                    MAX_MACHINE_TYPE);
  1813.         }
  1814.         else
  1815.         {
  1816.           plot_info->data_type = area_info->data_type;
  1817.           plot_info->machine_type = area_info->machine_type;
  1818.         }
  1819.       }
  1820.       else if (file_type == XVIFF)
  1821.       {
  1822.         if (prompting)
  1823.         {
  1824.         fprintf(stderr, "\n\t----------------------------------------------\n");
  1825.                fprintf(stderr, "\tSpecify the data band to plot if the image is multiband for plot %d\n",
  1826.                plot_number);
  1827.             }
  1828.     
  1829.         sprintf(key,"-band%d%d", plot_area, plot_number);
  1830.         sprintf(prompt,"Enter: (%s) (int) (%d) - ", key,
  1831.             area_info->whichband);
  1832.         if (area_info->whichband != -1)
  1833.         value = area_info->whichband;
  1834.         else
  1835.         value = 0;
  1836.             specified = vget_int(fd_ansr, prompting, key, prompt,
  1837.                      &plot_info->whichband, value,
  1838.                      1, 1);
  1839.  
  1840.         if (prompting)
  1841.         {
  1842.         fprintf(stderr, "\n\t----------------------------------------------\n");
  1843.            fprintf(stderr, "\tSpecify the complex data type to plot if the image is of type Complex for plot %d\n\n",
  1844.            plot_number);
  1845.                fprintf(stderr, "\t1: Real         2: Imaginary \n");
  1846.                fprintf(stderr, "\t3: Magnitude    4: Phase\n\n");
  1847.             }
  1848.  
  1849.         sprintf(key,"-cmplx%d%d", plot_area, plot_number);
  1850.         sprintf(prompt,"Enter: (%s) (float) (%d) - ", key,
  1851.             area_info->cmplx);
  1852.         if (area_info->cmplx != 0)
  1853.         value = area_info->cmplx;
  1854.         else
  1855.         value = 1;
  1856.             specified = vget_int(fd_ansr, prompting, key, prompt,
  1857.                     &plot_info->cmplx, value,
  1858.                     1, 4);
  1859.       }
  1860.       else
  1861.       {
  1862.         plot_info->data_format = area_info->data_format;
  1863.         plot_info->data_type = area_info->data_type;
  1864.         plot_info->machine_type = area_info->machine_type;
  1865.       }
  1866.     }
  1867.       } while (need_plot);
  1868.  
  1869. /*
  1870.    If the answer file specifies that file X in plot area Y should exists, but
  1871.    no file or function is given, ignore the plot specifications.
  1872. */
  1873.       if ( ! no_plot_specified )
  1874.       {
  1875.     have_plot_in_area = TRUE;
  1876.     if (prompting)
  1877.     {
  1878.         fprintf(stderr, "\n\t----------------------------------------------\n");
  1879.            fprintf(stderr, "\tSpecify X and Y points to plot for plot %d --\n\n",
  1880.            plot_number);
  1881.     }
  1882.  
  1883.     if ( plotting_file )
  1884.     {
  1885.        (void) get_file_points(PLOT_3D, plot_info->i_file,
  1886.                   plot_info->data_format, plot_info->data_type, 
  1887.                   &xdefault_maximum_int, &ydefault_maximum_int);
  1888.  
  1889.       if ( default_maximum_int == -1 )
  1890.       {
  1891.         xdefault_maximum_int = area_info->xend_point;
  1892.         ydefault_maximum_int = area_info->yend_point;
  1893.       }
  1894.     }
  1895.     else
  1896.     {
  1897.       (void) sprintf(temp,"x = (%s,%s,%s)", plot_info->func_xmin,
  1898.                     plot_info->func_xmax, plot_info->func_xptnum);
  1899.  
  1900.       if (! get_range(temp, &beg, &end, &xdefault_maximum_int, temp1))
  1901.       {
  1902.         xdefault_maximum_int = area_info->xend_point;
  1903.       }
  1904.  
  1905.       (void) sprintf(temp,"y = (%s,%s,%s)", plot_info->func_ymin,
  1906.                     plot_info->func_ymax, plot_info->func_yptnum);
  1907.  
  1908.       if (! get_range(temp, &beg, &end, &ydefault_maximum_int, temp1))
  1909.       {
  1910.         ydefault_maximum_int = area_info->yend_point;
  1911.       }
  1912.     }
  1913.  
  1914.     if ( area_info->xbegin_point <= xdefault_maximum_int )
  1915.     {
  1916.       xdefault_value_int = area_info->xbegin_point;
  1917.     }
  1918.     else
  1919.     {
  1920.       xdefault_value_int = 0;
  1921.     }
  1922.  
  1923.     sprintf(key,"-xb%d%d", plot_area, plot_number);
  1924.         sprintf(prompt,"Enter: (%s) (int) (%d) X begin data point for plot %d - ",
  1925.             key, default_value_int, plot_number);
  1926.     specified = vget_int(fd_ansr, prompting, key, prompt,
  1927.                  &plot_info->xbegin_point, xdefault_value_int,
  1928.                  0, xdefault_maximum_int);
  1929.  
  1930.     if ( area_info->xend_point <= xdefault_maximum_int )
  1931.     {
  1932.       xdefault_value_int = area_info->xend_point;
  1933.     }
  1934.     else
  1935.     {
  1936.       xdefault_value_int = 0;
  1937.     }
  1938.  
  1939.     sprintf(key,"-xe%d%d", plot_area, plot_number);
  1940.     sprintf(prompt,"Enter: (%s) (int) (%d) X end data point for plot %d - ",
  1941.             key, default_value_int, plot_number);
  1942.     specified = vget_int(fd_ansr, prompting, key, prompt,
  1943.                  &plot_info->xend_point, xdefault_value_int,
  1944.                  plot_info->xbegin_point, xdefault_maximum_int);
  1945.  
  1946.     if ( plot_info->xend_point == 0 && /* plot to last point in file */
  1947.          plotting_file )
  1948.     {
  1949.       xdefault_maximum_int = xdefault_maximum_int - plot_info->xbegin_point;
  1950.     }
  1951.     else if ( plot_info->xend_point == 0 && /* plot to last point in file */
  1952.           plotting_function )
  1953.     {
  1954.       default_maximum_int = xdefault_maximum_int -
  1955.                   plot_info->xbegin_point;
  1956.     }
  1957.     else if ( plot_info->xend_point != 0 )
  1958.     {
  1959.       xdefault_maximum_int = plot_info->xend_point - plot_info->xbegin_point;
  1960.     }
  1961.  
  1962.     if ( default_maximum_int < area_info->xstep_size )
  1963.     {
  1964.       xdefault_value_int = 1;
  1965.     }
  1966.     else
  1967.     {
  1968.       xdefault_value_int = area_info->xstep_size;
  1969.     }
  1970.  
  1971.     sprintf(key,"-xs%d%d", plot_area, plot_number);
  1972.     sprintf(prompt,"Enter: (%s) (int) (%d) X step size for plot %d - ",
  1973.             key, xdefault_value_int, plot_number);
  1974.     specified = vget_int(fd_ansr, prompting, key, prompt,
  1975.                  &plot_info->xstep_size, xdefault_value_int,
  1976.                  1, xdefault_maximum_int);
  1977.  
  1978. /* Take care of Y begin_point, endpoint and step */
  1979.  
  1980.     if ( area_info->ybegin_point <= ydefault_maximum_int )
  1981.     {
  1982.       ydefault_value_int = area_info->ybegin_point;
  1983.     }
  1984.     else
  1985.     {
  1986.       ydefault_value_int = 0;
  1987.     }
  1988.  
  1989.     sprintf(key,"-yb%d%d", plot_area, plot_number);
  1990.         sprintf(prompt,"Enter: (%s) (int) (%d) Y begin data point for plot %d - ",
  1991.             key, default_value_int, plot_number);
  1992.     specified = vget_int(fd_ansr, prompting, key, prompt,
  1993.                  &plot_info->ybegin_point, ydefault_value_int,
  1994.                  0, ydefault_maximum_int);
  1995.  
  1996.     if ( area_info->yend_point <= ydefault_maximum_int )
  1997.     {
  1998.       ydefault_value_int = area_info->yend_point;
  1999.     }
  2000.     else
  2001.     {
  2002.       ydefault_value_int = 0;
  2003.     }
  2004.  
  2005.     sprintf(key,"-ye%d%d", plot_area, plot_number);
  2006.     sprintf(prompt,"Enter: (%s) (int) (%d) Y end data point for plot %d - ",
  2007.             key, default_value_int, plot_number);
  2008.     specified = vget_int(fd_ansr, prompting, key, prompt,
  2009.                  &plot_info->yend_point, ydefault_value_int,
  2010.                  plot_info->ybegin_point, ydefault_maximum_int);
  2011.  
  2012.     if ( plot_info->yend_point == 0 && /* plot to last point in file */
  2013.          plotting_file )
  2014.     {
  2015.       ydefault_maximum_int = ydefault_maximum_int - plot_info->ybegin_point;
  2016.     }
  2017.     else if ( plot_info->yend_point == 0 && /* plot to last point in file */
  2018.           plotting_function )
  2019.     {
  2020.       default_maximum_int = ydefault_maximum_int -
  2021.                   plot_info->ybegin_point;
  2022.     }
  2023.     else if ( plot_info->yend_point != 0 )
  2024.     {
  2025.       ydefault_maximum_int = plot_info->yend_point - plot_info->ybegin_point;
  2026.     }
  2027.  
  2028.     if ( default_maximum_int < area_info->ystep_size )
  2029.     {
  2030.       ydefault_value_int = 1;
  2031.     }
  2032.     else
  2033.     {
  2034.       ydefault_value_int = area_info->ystep_size;
  2035.     }
  2036.  
  2037.     sprintf(key,"-ys%d%d", plot_area, plot_number);
  2038.     sprintf(prompt,"Enter: (%s) (int) (%d) Y step size for plot %d - ",
  2039.             key, ydefault_value_int, plot_number);
  2040.     specified = vget_int(fd_ansr, prompting, key, prompt,
  2041.                  &plot_info->ystep_size, ydefault_value_int,
  2042.                  1, ydefault_maximum_int);
  2043.  
  2044.     if (prompting)
  2045.     {
  2046.         fprintf(stderr, "\n\t----------------------------------------------\n");
  2047.            fprintf(stderr, "\tSpecify PLOT TYPE for plot %d --\n\n",
  2048.            plot_number);
  2049.         fprintf(stderr, "\t0: 3D          1: Mesh          2: Scatter\n");
  2050.         fprintf(stderr, "\t3: 3D Contour  4: 2D Contour    5: Impulse\n");
  2051.         fprintf(stderr, "\t6: Surface      7: Horizon       8: Color Mesh\n\n");
  2052.         }
  2053.  
  2054.     sprintf(key,"-pt%d%d", plot_area, plot_number);
  2055.     sprintf(prompt,"Enter: (%s) (float) (%d: %s) - ", key,
  2056.         area_info->plot_type, plotnames[area_info->plot_type]);
  2057.         specified = vget_int(fd_ansr, prompting, key, prompt,
  2058.                  &plot_info->plot_type, area_info->plot_type,
  2059.                  MIN_PLOT_TYPE, MAX_PLOT_TYPE);
  2060.  
  2061.     if ( plot_info->plot_type == (PLOT_SCATTER + 1))
  2062.     {
  2063.       if (prompting)
  2064.       {
  2065.     fprintf(stderr, "\n\t----------------------------------------------\n");
  2066.         fprintf(stderr, "\tSpecify INDIVIDUAL MARKER TYPES --\n");
  2067.     fprintf(stderr, "\t1:  Square        2: Triangle       3: Cross\n");
  2068.     fprintf(stderr, "\t4:  BowTie        5: Arc            6: Diamond\n");
  2069.     fprintf(stderr, "\t7:  Circle        8: V              9: Hexagon\n");
  2070.     fprintf(stderr, "\t10: X            11: Droplet       12: Caret\n");
  2071.     fprintf(stderr, "\t13: Point        14: Dagger        15: Box\n");
  2072.       }
  2073.  
  2074.       sprintf(key,"-mt%d%d", plot_area, plot_number);
  2075.       if (specified_marker_type)
  2076.       {
  2077.         default_value_int = area_info->marker_type;
  2078.       }
  2079.       else
  2080.       {
  2081.         default_value_int = (plot_number - 1) % MAX_MARKER_TYPE + 1;
  2082.       }
  2083.       sprintf(prompt,"Enter: (%s) (float) (%d: %s) - ", key,
  2084.           default_value_int, markernames[default_value_int - 1]);
  2085.           specified = vget_int(fd_ansr, prompting, key, prompt,
  2086.                    &plot_info->marker_type, default_value_int,
  2087.                    MIN_MARKER_TYPE, MAX_MARKER_TYPE);
  2088. /*
  2089.    Set up default line type even though it is not used initially.
  2090. */
  2091.       if (specified_line_type)
  2092.       {
  2093.         plot_info->line_type = area_info->line_type;
  2094.       }
  2095.       else
  2096.       {
  2097.         plot_info->line_type = (plot_number - 1) % MAX_LINE_TYPE + 1;
  2098.       }
  2099.     }
  2100.     else
  2101.     {
  2102.       if (prompting)
  2103.       {
  2104.     fprintf(stderr, "\n\t----------------------------------------------\n");
  2105.         fprintf(stderr, "\tTo specify the DEFAULT LINE TYPE --\n\n");
  2106.     fprintf(stderr, "\t1: Solid          2: Dotted\n");
  2107.     fprintf(stderr, "\t3: Dot Dashed:    4: Short Dashed\n");
  2108.     fprintf(stderr, "\t5: Long Dashed:   6: Odd Dashed\n");
  2109.       }
  2110.  
  2111.       sprintf(key,"-lt%d%d", plot_area, plot_number);
  2112.       if (specified_line_type)
  2113.       {
  2114.         default_value_int = area_info->line_type;
  2115.       }
  2116.       else
  2117.       {
  2118.         default_value_int = (plot_number - 1) % MAX_LINE_TYPE + 1;
  2119.       }
  2120.       sprintf(prompt,"Enter: (%s) (float) (%d: %s) - ", key,
  2121.           default_value_int, linenames[default_value_int - 1]);
  2122.       specified = vget_int(fd_ansr, prompting, key, prompt,
  2123.                    &plot_info->line_type, default_value_int,
  2124.                    MIN_LINE_TYPE, MAX_LINE_TYPE);
  2125. /*
  2126.    Set up default marker type even though it is not used initially.
  2127. */
  2128.       if (specified_marker_type)
  2129.       {
  2130.         plot_info->marker_type = area_info->marker_type;
  2131.       }
  2132.       else
  2133.       {
  2134.         plot_info->marker_type = (plot_number - 1) % MAX_MARKER_TYPE + 1;
  2135.       }
  2136.     }
  2137.  
  2138.     if (prompting)
  2139.     {
  2140.     fprintf(stderr, "\n\t----------------------------------------------\n");
  2141.     fprintf(stderr, "\tTo specify COLORS FOR INDIVIDUAL PLOTS --\n\n");
  2142.     fprintf(stderr, "\t 0: White   1: Green      2: Yellow  3: Cyan\n");
  2143.     fprintf(stderr, "\t 4: Orchid  5: Magenta    6: Orange  7: Wheat\n");
  2144.        fprintf(stderr, "\t 8: Lime    9: Turquoise 10: Pink   11: LightGrey\n");
  2145.     fprintf(stderr, "\t12: Plum   13: Forest    14: Salmon 15: Thistle\n");
  2146.     fprintf(stderr, "\t16: Violet 17: OrangeRed 18: Red    19: SeaGreen\n");
  2147.     fprintf(stderr, "\t20: Blue   21: Goldenrod 22: Coral  23: Sienna\n\n");
  2148.     }
  2149.  
  2150.     sprintf(key,"-pc%d%d", plot_area, plot_number);
  2151.     if (specified_color_type)
  2152.     {
  2153.       default_value_int = area_info->plot_color;
  2154.     }
  2155.     else
  2156.     {
  2157.       default_value_int = (plot_number) % MAX_COLOR_TYPE;
  2158.     }
  2159.     sprintf(prompt,"Enter: (%s) (float) (%d: %s) - ", key,
  2160.          default_value_int, colornames[default_value_int]);
  2161.     specified = vget_int(fd_ansr, prompting, key, prompt,
  2162.                  &plot_info->plot_color, default_value_int,
  2163.                  MIN_COLOR_TYPE, MAX_COLOR_TYPE);
  2164.  
  2165.     sprintf(key,"-active%d%d", plot_area, plot_number);
  2166.     specified = vget_logic(fd_ansr, prompting, key, "noprompt", 
  2167.                    &plot_info->active, area_info->active);
  2168.  
  2169.     sprintf(key,"-legendstr%d%d", plot_area, plot_number);
  2170.     sprintf(string," Plot %d ", plot_number);
  2171.     specified = vget_string(fd_ansr, prompting, key, "noprompt",
  2172.                     &plot_info->legend_str, string);
  2173.       }
  2174.     } /* Finished aquiring plot info */
  2175.  
  2176.     if ( have_plot_in_area )
  2177.     {
  2178.       xprism3_args->plots_specified = TRUE;
  2179.     }
  2180.   } /* Finished aquiring plot area info */
  2181.  
  2182.   if ( fd_ansr != -1 && called_by_main )
  2183.   {
  2184.      close_afile(fd_ansr);
  2185.   }
  2186. }
  2187.  
  2188. /***********************************************************************
  2189. *
  2190. *  Routine Name: find_machtype_index
  2191. *
  2192. *          Date: Aug 9, 1990
  2193. *        
  2194. *       Purpose: This routine returns the index into the machine_names[]
  2195. *           array that matches the default_machine_name passed in.
  2196. *
  2197. *         Input: char *default_machine_name;
  2198. *
  2199. *        Output: 
  2200. *
  2201. *    Written By:  John Salas
  2202. *
  2203. * Modifications:
  2204. *
  2205. ***********************************************************************/
  2206.  
  2207. int
  2208. find_machtype_index(default_machine_name)
  2209. char *default_machine_name;
  2210.  
  2211. {
  2212.   int i;
  2213.  
  2214.   for ( i = 0 ; i < NUMBER_MACHINES ; i++ )
  2215.   {
  2216.     if ( ! strcmp(default_machine_name, machine_defs[i].hosttype) )
  2217.     {
  2218.       return (i);
  2219.     }
  2220.   }
  2221.   return(NUMBER_MACHINES - 1);
  2222. }
  2223.  
  2224. /***********************************************************************
  2225. *
  2226. *  Routine Name: set_global_indir
  2227. *
  2228. *          Date: Aug 9, 1990
  2229. *        
  2230. *       Purpose: This routine sets the global output path or
  2231. *               directory.
  2232. *
  2233. *         Input: char *indir
  2234. *
  2235. *        Output: 
  2236. *
  2237. *    Written By:  John Salas
  2238. *
  2239. * Modifications:
  2240. *
  2241. ***********************************************************************/
  2242. int
  2243. set_global_indir(indir)
  2244. char *indir;
  2245.  
  2246. {
  2247.     if (indir == NULL)
  2248.     {
  2249.     return(1);
  2250.     }
  2251.  
  2252.     global_indir = xvf_strcpy(indir);
  2253.  
  2254.     XVF_FILE_DIR = xvf_strcpy(global_indir);
  2255.  
  2256.     return(0);
  2257. }
  2258.  
  2259. /***********************************************************************
  2260. *
  2261. *  Routine Name: set_global_outdir
  2262. *
  2263. *          Date: Aug 9, 1990
  2264. *        
  2265. *       Purpose: This routine sets the global output path or
  2266. *               directory.
  2267. *
  2268. *         Input: 
  2269. *
  2270. *        Output: 
  2271. *
  2272. *    Written By:  John Salas
  2273. *
  2274. * Modifications:
  2275. *
  2276. ***********************************************************************/
  2277.  
  2278. int
  2279. set_global_outdir(outdir)
  2280. char *outdir;
  2281.  
  2282. {
  2283.     if (outdir == NULL)
  2284.     {
  2285.     return(1);
  2286.     }
  2287.  
  2288.     global_outdir = xvf_strcpy(outdir);
  2289.  
  2290.     return(0);
  2291. }
  2292.