Changeset 2801 for trunk/Ohana/src/opihi/lib.shell/parse.c
- Timestamp:
- Dec 23, 2004, 7:36:01 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/lib.shell/parse.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/lib.shell/parse.c
r2792 r2801 56 56 if (*V1 == 0) goto error; 57 57 58 /* command replacement. execute the line, place answer in val. */ 58 59 if (*V1 == '`') { 59 /* command replacement. execute the line, place answer in val. */60 60 61 61 /* look for end of line, must be ` */ … … 79 79 if (*B == '\n') *B = ' '; 80 80 } 81 } else { 81 } 82 83 /* simple variable assignment */ 84 if (*V1 != '`') { 82 85 /* dvomath returns a new string, or NULL, with the result of the expression */ 83 86 val = dvomath (1, &V1, &size, 0); … … 107 110 V = strncreate (N+1, L - N - 1); 108 111 109 /* expand value in parenthesis */112 /* expand value in brackets */ 110 113 val = dvomath (1, &V, &size, 0); 111 114 if (val == NULL) { … … 172 175 *c1 = 0; 173 176 174 /* value in brackets must be an expression of some sort */ 177 /* value in brackets must be a math expression of some sort. 178 isolated words are not valid here */ 175 179 val = dvomath (1, &L, &size, -1); 176 180 if (val == NULL) {
Note:
See TracChangeset
for help on using the changeset viewer.
