IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 10, 2007, 7:43:40 AM (20 years ago)
Author:
eugene
Message:

fixed macro function error, added restrictions to book selections

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/lib.shell/ListOps.c

    r10846 r11007  
    111111  char *comm;
    112112  char *this_macro;
    113 
    114   comm = thisword (line);
    115   if (comm == (char *) NULL) return (FALSE);
     113  CommandF *cmd;
     114
     115  comm = thisword (line);
     116  if (comm == NULL) return (FALSE);
    116117
    117118  status = !strcmp (comm, "macro");
     
    120121 
    121122  this_macro = thisword (nextword (line));
    122 
    123   if (this_macro == (char *)NULL) return (FALSE);
    124 
    125   N = sizeof (in_macro) / sizeof (Command);
    126 
    127   /* find the macro sub-command which matches from the list. */
    128   /* if sub-command is not found, assume this is creating a new macro */
    129   for (i = 0; i < N; i++) {
    130     if (!strcmp (in_macro[i].name, this_macro)) {
    131       free (this_macro);
    132       return (FALSE);
    133     }
    134   }
    135 
     123  if (this_macro == NULL) return (FALSE);
     124
     125  cmd = find_macro_command (this_macro);
    136126  free (this_macro);
     127
     128  if (cmd == NULL) {
     129    return (FALSE);
     130  }
     131
    137132  return (TRUE);
    138 
    139133}
    140134
Note: See TracChangeset for help on using the changeset viewer.