IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 2825


Ignore:
Timestamp:
Dec 24, 2004, 6:21:27 PM (22 years ago)
Author:
eugene
Message:

fixed refs to typename/modename

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/dvo/imrough.c

    r2598 r2825  
    55enum {V_NONE, V_EXPTIME, V_CCDN, V_SKY, V_BIAS, V_FILTER, V_FWHM, V_AIRM, V_TIME, V_TEMP0, V_TEMP1, V_TEMP2, V_TEMP3, V_TELFOCUS, V_XPROBE, V_YPROBE, V_ZPROBE, V_RA, V_DEC, V_DETTEMP, V_ROTANGLE, V_REGTIME};
    66static char valuename[NVALUE][32] = {"none", "exptime", "ccd", "sky", "bias", "filter", "fwhm", "airmass", "time", "temp0", "temp1", "temp2", "temp3", "telfocus", "xprobe", "yprobe", "zprobe", "ra", "dec", "dettemp", "rotangle", "regtime"};
    7 
    8 # define NTYPE 9
    9 enum {T_NONE, T_OBJECT, T_DARK, T_BIAS, T_FLAT, T_MASK, T_FRINGE, T_SCATTER, T_MODES};
    10 static char typename[NTYPE][32] = {"none", "object", "dark", "bias", "flat", "mask", "fringe", "scatter", "modes"};
    11 
    12 # define NMODE 6
    13 enum {M_NONE, M_MEG, M_SPLIT, M_SINGLE, M_CUBE, M_SLICE};
    14 static char modename[NMODE][32] = {"none", "MEF", "SPLIT", "SINGLE", "CUBE", "SLICE"};
    157
    168imrough (int argc, char **argv) {
     
    6759  }
    6860 
    69   type = T_NONE;
     61  type = T_UNDEF;
    7062  TypeSelect = FALSE;
    7163  if (N = get_argument (argc, argv, "-type")) {
    7264    TypeSelect = TRUE;
    7365    remove_argument (N, &argc, argv);
    74     for (i = 0; (i < NTYPE) && (type == T_NONE); i++) {
    75       if (!strncasecmp (argv[N], typename[i], strlen(argv[N]))) type = i;
    76     }
    77     if (type == T_NONE) {
     66    type = get_image_type (argv[N]);
     67    if (type == T_UNDEF) {
    7868      fprintf (stderr, "ERROR: invalid image type %s\n", argv[N]);
    7969      return (FALSE);
     
    8777    ModeSelect = TRUE;
    8878    remove_argument (N, &argc, argv);
    89     for (i = 0; (i < NMODE) && (mode == M_NONE); i++) {
    90       if (!strncasecmp (argv[N], modename[i], strlen(argv[N]))) mode = i;
    91     }
    92     if (mode == M_NONE) {
     79    mode = get_image_mode (argv[N]);
     80    if (mode == M_UNDEF) {
    9381      fprintf (stderr, "ERROR: invalid image mode %s\n", argv[N]);
    9482      return (FALSE);
Note: See TracChangeset for help on using the changeset viewer.