Changeset 20936 for trunk/Ohana/src/opihi/lib.shell/check_stack.c
- Timestamp:
- Dec 7, 2008, 3:31:01 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/lib.shell/check_stack.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/lib.shell/check_stack.c
r6250 r20936 4 4 5 5 int i, Nx, Ny, Nv, size; 6 char *c ;6 char *c1, *c2; 7 7 8 8 Nv = Nx = Ny = -1; … … 11 11 if (stack[i].type == 'X') { 12 12 13 /** if this is a number, put it on the list of scalers and move on **/ 14 stack[i].Float = strtod (stack[i].name, &c); 15 if (c == stack[i].name + strlen (stack[i].name)) { 16 stack[i].ptr = &(stack[i].Float); 17 stack[i].type = 'S'; 13 /** if this is a number, put it on the list of scalars and move on. assume value is 14 * an int unless proven otherwise **/ 15 stack[i].FltValue = strtod (stack[i].name, &c1); 16 stack[i].IntValue = strtol (stack[i].name, &c2, 0); 17 if (c2 == stack[i].name + strlen (stack[i].name)) { 18 stack[i].type = 's'; // 's' == (int) 19 continue; 20 } 21 if (c1 == stack[i].name + strlen (stack[i].name)) { 22 stack[i].type = 'S'; // 'S' == (float) 18 23 continue; 19 24 } … … 22 27 if (IsBuffer (stack[i].name)) { 23 28 stack[i].buffer = SelectBuffer (stack[i].name, OLDBUFFER, TRUE); 24 stack[i].ptr = (float *) stack[i].buffer[0].matrix.buffer;25 29 stack[i].type = 'M'; 26 30 if (Nx == -1) { … … 44 48 if (IsVector (stack[i].name)) { 45 49 stack[i].vector = SelectVector (stack[i].name, OLDVECTOR, FALSE); 46 stack[i].ptr = (float *) stack[i].vector[0].elements;47 50 stack[i].type = 'V'; 48 51
Note:
See TracChangeset
for help on using the changeset viewer.
