IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 8, 2019, 8:20:03 PM (7 years ago)
Author:
eugene
Message:

add deimos fitslit, mkobj, mkslit commands

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/mana/deimos.c

    r40617 r40622  
    11# include "data.h"
    22
    3 int deimos_list (int argc, char **argv);
     3int deimos_mkslit (int argc, char **argv);
     4int deimos_fitslit (int argc, char **argv);
     5int deimos_mkobj (int argc, char **argv);
    46
    5 static Command book_commands[] = {
    6   {1, "list",     book_list,     "list books"},
     7static Command deimos_commands[] = {
     8  {1, "mkobj", deimos_mkobj, "make a full object image"},
     9  {1, "mkslit", deimos_mkslit, "make a slit image"},
     10  {1, "fitslit", deimos_fitslit, "fit slit image to observed slit flux"},
    711};
    812
    9 int book_command (int argc, char **argv) {
     13int deimos (int argc, char **argv) {
    1014
    1115  int i, N, status;
    1216
    1317  if (argc < 2) {
    14     gprint (GP_ERR, "USAGE: book (command)\n");
    15     gprint (GP_ERR, "    book list                                  : list books\n");
     18    gprint (GP_ERR, "USAGE: deimos (command)\n");
     19    gprint (GP_ERR, "    deimos mkslit : make slit image\n");
    1620    return (FALSE);
    1721  }
    1822
    19   N = sizeof (book_commands) / sizeof (Command);
     23  N = sizeof (deimos_commands) / sizeof (Command);
    2024
    21   /* find the book sub-command which matches */
     25  /* find the deimos sub-command which matches */
    2226  for (i = 0; i < N; i++) {
    23     if (!strcmp (book_commands[i].name, argv[1])) {
    24       status = (*book_commands[i].func) (argc - 1, argv + 1);
     27    if (!strcmp (deimos_commands[i].name, argv[1])) {
     28      status = (*deimos_commands[i].func) (argc - 1, argv + 1);
    2529      return (status);
    2630    }
    2731  }
    2832
    29   gprint (GP_ERR, "unknown book command %s\n", argv[1]);
     33  gprint (GP_ERR, "unknown deimos command %s\n", argv[1]);
    3034  return (FALSE);
    3135}
Note: See TracChangeset for help on using the changeset viewer.