Changeset 11119 for trunk/Ohana/src/opihi/lib.shell/ListOps.c
- Timestamp:
- Jan 17, 2007, 3:39:12 PM (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
r11007 r11119 157 157 } 158 158 159 // list (word) : nested list 160 // list (word) -x : not nested list 161 // list (word) -split : not nested list 162 int is_list_data (char *line) { 163 164 char *comm, *temp; 165 166 temp = thisword (nextword (nextword (line))); 167 comm = thisword (line); 168 169 if (comm == NULL) goto escape; 170 171 if (strcmp (comm, "list")) goto escape; 172 173 /* if (cond) (command) does not define a complete block */ 174 if (temp != NULL) { 175 if (!strcmp (temp, "-x")) goto escape; 176 if (!strcmp (temp, "-split")) goto escape; 177 if (!strcmp (temp, "-add")) goto escape; 178 } 179 180 if (temp != NULL) free (temp); 181 if (comm != NULL) free (comm); 182 return (TRUE); 183 184 escape: 185 if (comm != NULL) free (comm); 186 if (temp != NULL) free (temp); 187 return (FALSE); 188 } 189 159 190 int is_loop (char *line) { 160 191 … … 216 247 status |= is_macro_create (line); 217 248 status |= is_for_loop (line); 249 status |= is_list_data (line); 218 250 status |= is_loop (line); 219 251 status |= is_task (line);
Note:
See TracChangeset
for help on using the changeset viewer.
