Changeset 11007 for trunk/Ohana/src/opihi/lib.shell/ListOps.c
- Timestamp:
- Jan 10, 2007, 7:43:40 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/lib.shell/ListOps.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/lib.shell/ListOps.c
r10846 r11007 111 111 char *comm; 112 112 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); 116 117 117 118 status = !strcmp (comm, "macro"); … … 120 121 121 122 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); 136 126 free (this_macro); 127 128 if (cmd == NULL) { 129 return (FALSE); 130 } 131 137 132 return (TRUE); 138 139 133 } 140 134
Note:
See TracChangeset
for help on using the changeset viewer.
