Changeset 16427
- Timestamp:
- Feb 13, 2008, 3:21:25 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/cmd.basic/list.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/cmd.basic/list.c
r13538 r16427 162 162 163 163 /* get the next line (from correct place) */ 164 if (ThisList == 0) 164 if (ThisList == 0) { 165 165 input = readline (prompt); 166 else166 } else { 167 167 input = get_next_listentry (ThisList); 168 169 if (input == (char *) NULL) { 170 if (ThisList == 0) { 171 gprint (GP_ERR, "end list with 'END'\n"); 172 continue; 173 } else { 174 return (FALSE); 175 } 176 } 168 } 169 170 if ((ThisList == 0) && (input == NULL)) { 171 gprint (GP_ERR, "end list with 'END'\n"); 172 continue; 173 } 174 if ((ThisList > 0) && (input == NULL)) { 175 gprint (GP_ERR, "missing 'END' in list\n"); 176 input = strcreate ("end"); 177 } 178 if (ThisList == 0) ohana_memregister (input); 179 177 180 stripwhite (input); 178 181 … … 191 194 sprintf (line, "%s:%d", argv[1], i); 192 195 set_str_variable (line, input); 196 free (input); 193 197 i++; 194 }198 } 195 199 } 196 200 return (TRUE);
Note:
See TracChangeset
for help on using the changeset viewer.
