IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 28, 2010, 10:27:33 AM (16 years ago)
Author:
eugene
Message:

updates from dev branch Ohana.20100407: improvements to kapa label and tick control, creation of setphot program

Location:
trunk/Ohana
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana

  • trunk/Ohana/src/opihi/cmd.basic/opihi.c

    r27255 r27790  
    33int opihi_setmode (int argc, char **argv) {
    44
    5   int value;
     5  OpihiVerboseMode value;
    66
    77  if (argc < 2) {
    8     gprint (GP_ERR, "USAGE: opihi (verbose) [on/off]\n");
     8    gprint (GP_ERR, "USAGE: opihi (verbose) [on/off/error]\n");
    99    return (FALSE);
    1010  }
     
    1313      if (argc == 2) {
    1414          value = get_verbose_shell();
    15           if (value) {
    16             gprint (GP_ERR, "opihi verbose mode: on\n");
    17           } else {
    18             gprint (GP_ERR, "opihi verbose mode: off\n");
    19           }
     15          switch (value) {
     16            case OPIHI_VERBOSE_OFF:
     17              gprint (GP_ERR, "opihi verbose mode: off\n");
     18              break;
     19            case OPIHI_VERBOSE_ON:
     20              gprint (GP_ERR, "opihi verbose mode: on\n");
     21              break;
     22            case OPIHI_VERBOSE_ERROR:
     23              gprint (GP_ERR, "opihi verbose mode: error\n");
     24              break;
     25            default:
     26              fprintf (stderr, "impossible condition\n");
     27              abort();
     28          }
    2029          return (TRUE);
    2130      }
    2231      if (!strcasecmp(argv[2], "on")) {
    23         set_verbose_shell (TRUE);
     32        set_verbose_shell (OPIHI_VERBOSE_ON);
    2433        return (TRUE);
    2534      }
    2635      if (!strcasecmp(argv[2], "off")) {
    27         set_verbose_shell (FALSE);
     36        set_verbose_shell (OPIHI_VERBOSE_OFF);
     37        return (TRUE);
     38      }
     39      if (!strcasecmp(argv[2], "error")) {
     40        set_verbose_shell (OPIHI_VERBOSE_ERROR);
    2841        return (TRUE);
    2942      }
Note: See TracChangeset for help on using the changeset viewer.