IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 10996


Ignore:
Timestamp:
Jan 9, 2007, 9:57:59 AM (19 years ago)
Author:
eugene
Message:

moved macro command list to macro.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/cmd.basic/macro.c

    r7917 r10996  
    11# include "basic.h"
    2 # include "macro.h"
     2
     3static Command macro_command[] = {
     4  {"create", macro_create, "create a macro *"},
     5  {"delete", macro_delete, "delete a macro *"},
     6  {"list",   macro_list_f, "list a macro *"},
     7  {"edit",   macro_edit,   "edit a macro <not working yet!> *"},
     8  {"read",   macro_read,   "read a macro from a file <not working yet!> *"},
     9  {"write",  macro_write,  "write a macro to a file <not working yet!> *"}
     10};
    311
    412int macro (int argc, char **argv) {
     
    1927  }
    2028
    21   N = sizeof (in_macro) / sizeof (Command);
     29  N = sizeof (macro_command) / sizeof (Command);
    2230
    2331  /* find the macro sub-command which matches from the list. */
    2432  /* if sub-command is not found, assume this is creating a new macro */
    2533  for (i = 0; i < N; i++) {
    26     if (!strcmp (in_macro[i].name, argv[1])) {
    27       status = (*in_macro[i].func) (argc - 1, argv + 1);
     34    if (!strcmp (macro_command[i].name, argv[1])) {
     35      status = (*macro_command[i].func) (argc - 1, argv + 1);
    2836      return (status);
    2937    }
Note: See TracChangeset for help on using the changeset viewer.