Changeset 42808
- Timestamp:
- May 8, 2025, 11:37:15 AM (14 months ago)
- Location:
- trunk/Ohana/src/opihi/lib.shell
- Files:
-
- 4 edited
-
CommandOps.c (modified) (1 diff)
-
ListOps.c (modified) (2 diffs)
-
MacroOps.c (modified) (1 diff)
-
macro_create.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/lib.shell/CommandOps.c
r39457 r42808 59 59 60 60 free (commands[Nc].name); 61 for (i = Nc + 1; i < Ncommands; i++) 61 for (i = Nc + 1; i < Ncommands; i++) { 62 62 commands[i - 1] = commands[i]; 63 } 63 64 Ncommands --; 64 REALLOCATE (commands, Command, Ncommands);65 65 return (TRUE); 66 66 } -
trunk/Ohana/src/opihi/lib.shell/ListOps.c
r40652 r42808 133 133 } 134 134 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' 135 138 int is_macro_create (char *line) { 136 139 … … 150 153 if (this_macro == NULL) return (FALSE); 151 154 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 152 161 cmd = find_macro_command (this_macro); 153 162 free (this_macro); 154 163 155 if (cmd == NULL) { 156 return (FALSE); 157 } 158 159 return (TRUE); 164 if (cmd == NULL) return (TRUE); 165 166 return (FALSE); 160 167 } 161 168 -
trunk/Ohana/src/opihi/lib.shell/MacroOps.c
r16888 r42808 111 111 112 112 FreeMacro (¯os[Nm]); 113 for (i = Nm + 1; i < Nmacros; i++) 113 for (i = Nm + 1; i < Nmacros; i++) { 114 114 macros[i - 1] = macros[i]; 115 } 115 116 Nmacros --; 116 117 return (TRUE); -
trunk/Ohana/src/opihi/lib.shell/macro_create.c
r31667 r42808 45 45 cmd[0].func = macro_exec; 46 46 AddCommand (cmd); 47 free (cmd); 47 free (cmd); // 48 48 macro = NewMacro (argv[1]); 49 49 } else { /**** Old Macro ****/
Note:
See TracChangeset
for help on using the changeset viewer.
