IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 7, 2008, 3:31:01 PM (17 years ago)
Author:
eugene
Message:

big update from eam_branch_20081124 with updates to Opihi math

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/lib.shell/check_stack.c

    r6250 r20936  
    44
    55  int i, Nx, Ny, Nv, size;
    6   char *c;
     6  char *c1, *c2;
    77
    88  Nv = Nx = Ny = -1;
     
    1111    if (stack[i].type == 'X') {
    1212
    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)
    1823        continue;
    1924      }
     
    2227      if (IsBuffer (stack[i].name)) {
    2328        stack[i].buffer = SelectBuffer (stack[i].name, OLDBUFFER, TRUE);
    24         stack[i].ptr    = (float *) stack[i].buffer[0].matrix.buffer;
    2529        stack[i].type   = 'M';
    2630        if (Nx == -1) {
     
    4448      if (IsVector (stack[i].name)) {
    4549        stack[i].vector = SelectVector (stack[i].name, OLDVECTOR, FALSE);
    46         stack[i].ptr    = (float *) stack[i].vector[0].elements;
    4750        stack[i].type   = 'V';
    4851
Note: See TracChangeset for help on using the changeset viewer.