IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 8, 2025, 11:37:15 AM (15 months ago)
Author:
eugene
Message:

fix an obscure mem-corruption issue; enable "macro create" and other macro sub-commands in lists (if,while,macro)

File:
1 edited

Legend:

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

    r40652 r42808  
    133133}
    134134
     135// this should return TRUE (is start of a new list-type environment)
     136// if the word following 'macro' is not one of the following:
     137// 'list', 'delete', 'read', 'write', 'edit'
    135138int is_macro_create (char *line) {
    136139
     
    150153  if (this_macro == NULL) return (FALSE);
    151154
     155  // the other macro subcommands do NOT start a new list environment
     156  if (!strcmp("create", this_macro)) {
     157    free (this_macro);
     158    return (TRUE);
     159  }
     160
    152161  cmd = find_macro_command (this_macro);
    153162  free (this_macro);
    154163
    155   if (cmd == NULL) {
    156     return (FALSE);
    157   }
    158 
    159   return (TRUE);
     164  if (cmd == NULL) return (TRUE);
     165
     166  return (FALSE);
    160167}
    161168
Note: See TracChangeset for help on using the changeset viewer.