IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 16, 2007, 2:27:00 PM (18 years ago)
Author:
eugene
Message:

fixed cases of hard-wired line length; some api cleanup in stack_math

File:
1 edited

Legend:

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

    r14517 r15878  
    3030  }
    3131  OUT[0].type = 'v'; /*** <<--- says this is a temporary matrix ***/
    32   strcpy (OUT[0].name, "tmp");
     32
    3333  M1  = V1[0].ptr;
    3434  M2  = V2[0].ptr;
     
    128128    free (V2[0].vector);
    129129  }
    130 
    131130  /* at the end, V1 and V2 are deleted only if they were temporary */
     131
     132  clear_stack (V1);
     133  clear_stack (V2);
    132134  return (TRUE);
    133135
     
    150152  }
    151153  OUT[0].type = 'v';   /*** <<--- says this is a temporary matrix ***/
    152   strcpy (OUT[0].name, "tmp");
     154
    153155  M1  = V1[0].ptr;
    154156  M2  = V2[0].ptr;
     
    243245    free (V2[0].vector);
    244246  }
     247
     248  clear_stack (V1);
     249  clear_stack (V2);
    245250
    246251  /* at the end, V1 and V2 are deleted only if they were temporary */
     
    265270  }
    266271  OUT[0].type = 'v';   /*** <<--- says this is a temporary matrix ***/
    267   strcpy (OUT[0].name, "tmp");
     272
    268273  M1  = V1[0].ptr;
    269274  M2  = V2[0].ptr;
     
    359364    free (V1[0].vector);
    360365  }
     366
     367  clear_stack (V1);
     368  clear_stack (V2);
     369
    361370  /* at the end, V1 and V2 are deleted only if they were temporary */
    362371  return (TRUE);
     
    387396  }
    388397  OUT[0].type = 'm'; /*** <<--- says this is a temporary matrix ***/
    389   strcpy (OUT[0].name, "tmp");
     398
    390399  M1  = V1[0].ptr;
    391400  M2  = V2[0].ptr;
     
    524533    free (V2[0].vector);
    525534  }
     535
     536  clear_stack (V1);
     537  clear_stack (V2);
     538
    526539  /* at the end, V1 and V2 are deleted only if they were temporary */
    527540  return (TRUE);
     
    551564  }
    552565  OUT[0].type = 'm'; /*** <<--- says this is a temporary matrix ***/
    553   strcpy (OUT[0].name, "tmp");
     566
    554567  M1  = V1[0].ptr;
    555568  M2  = V2[0].ptr;
     
    707720    free (V2[0].buffer);
    708721  }
     722
     723  clear_stack (V1);
     724  clear_stack (V2);
     725
    709726  /* at the end, V1 and V2 are deleted only if they were temporary */
    710727  return (TRUE);
     
    734751  }
    735752  OUT[0].type = 'm'; /*** <<--- says this is a temporary matrix ***/
    736   strcpy (OUT[0].name, "tmp");
     753
    737754  M1  = V1[0].ptr;
    738755  M2  = V2[0].ptr;
     
    834851    free (V2[0].buffer);
    835852  }
     853
     854  clear_stack (V1);
     855  clear_stack (V2);
     856
    836857  /* at the end, V1 and V2 are deleted only if they were temporary */
    837858  return (TRUE);
     
    858879  }
    859880  OUT[0].type = 'm';      /*** <<--- says this is a temporary matrix ***/
    860   strcpy (OUT[0].name, "tmp");
     881
    861882  M1  = V1[0].ptr;
    862883  M2  = V2[0].ptr;
     
    951972    free (V1[0].buffer);
    952973  }
     974  clear_stack (V1);
     975  clear_stack (V2);
     976
    953977  return (TRUE);
    954978
     
    973997  }
    974998  OUT[0].type = 'm'; /*** <<--- says this is a temporary matrix ***/
    975   strcpy (OUT[0].name, "tmp");
     999
    9761000  M1  = V1[0].ptr;
    9771001  M2  = V2[0].ptr;
     
    10661090    free (V2[0].buffer);
    10671091  }
     1092  clear_stack (V1);
     1093  clear_stack (V2);
     1094
    10681095  return (TRUE);
    10691096
     
    10801107  OUT[0].ptr = V1[0].ptr;
    10811108  out = OUT[0].ptr;
    1082   strcpy (OUT[0].name, "tmp");
     1109
    10831110
    10841111  switch (op[0]) {
     
    11471174  OUT[0].Float = *(OUT[0].ptr);
    11481175  OUT[0].type = 'S';
     1176
     1177  clear_stack (V1);
     1178  clear_stack (V2);
     1179
    11491180  return (TRUE);
    11501181
     
    11921223
    11931224escape:
    1194   strcpy (OUT[0].name, "tmp");
    11951225  OUT[0].Float = value;
    11961226  OUT[0].type = 'S';
    11971227  OUT[0].ptr = &OUT[0].Float;
     1228
     1229  clear_stack (V1);
     1230  clear_stack (V2);
    11981231  return (TRUE);
    11991232
     
    12441277  OUT[0].Float = *out;
    12451278  OUT[0].type = 'S';
     1279
     1280  clear_stack (V1);
    12461281  return (TRUE);
    12471282
     
    13091344    free (V1[0].vector[0].elements);
    13101345    free (V1[0].vector);
     1346    V1[0].vector = NULL;
    13111347  } 
     1348
     1349  clear_stack (V1);
    13121350  return (TRUE);
    13131351
     
    13901428    free (V1[0].buffer);
    13911429  }
     1430
     1431  clear_stack (V1);
    13921432  return (TRUE);
    13931433
Note: See TracChangeset for help on using the changeset viewer.