Changeset 36681 for trunk/Ohana/src/opihi/lib.shell/ListOps.c
- Timestamp:
- Apr 21, 2014, 10:45:10 AM (12 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
r36679 r36681 185 185 186 186 // list (word) : nested list 187 // list (word) -x : not nested list 188 // list (word) -split : not nested list187 // list (word) -x : not nested list [-x may be the list of options below] 188 // list -excel (word) -x : 189 189 int is_list_data (char *line) { 190 190 191 191 char *comm = NULL; 192 192 char *temp = NULL; 193 char *ptr = NULL; 193 char *name = NULL; 194 char *opts = NULL; 194 195 195 196 comm = thisword (line); … … 197 198 if (strcmp (comm, "list")) goto escape; 198 199 199 ptr = nextword (line); 200 if (!strncmp("-excel", ptr, strlen("-excel"))) ptr = nextword (ptr); 201 if (!strncmp("-excel-style", ptr, strlen("-excel-style"))) ptr = nextword (ptr); 202 temp = thisword (ptr); 200 // name == name of the list in question 201 name = nextword (line); 202 203 // skip a -excel or -excel-style modifier 204 if (!strncmp("-excel", name, strlen("-excel"))) name = nextword (name); 205 if (!strncmp("-excel-style", name, strlen("-excel-style"))) name = nextword (name); 206 207 // get the thing following ptr, if any (opts points at a substring, temp is a new string) 208 opts = nextword (name); 209 temp = thisword (opts); 203 210 204 211 /* if (cond) (command) does not define a complete block */
Note:
See TracChangeset
for help on using the changeset viewer.
