IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 13, 2011, 11:28:01 AM (15 years ago)
Author:
eugene
Message:

add += and -= to opihi; allow 0 length vectors; fix mem leak in some binary math operations; check and handle some error cases in command.c

File:
1 edited

Legend:

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

    r15878 r30614  
    6464    /* variable assignment (skip these variables) */
    6565    if ((L == line) && (V1 != NULL)) {
    66       if ((*V1 == '=') || !strcmp (V1, "++") || !strcmp (V1, "--")) {
     66      int isAssignment;
     67
     68      isAssignment = FALSE;
     69      isAssignment |= (V1[0] == '=');
     70      isAssignment |= (V1[0] == '+') && (V1[1] == '=');
     71      isAssignment |= (V1[0] == '-') && (V1[1] == '=');
     72      isAssignment |= (V1[0] == '+') && (V1[1] == '+');
     73      isAssignment |= (V1[0] == '-') && (V1[1] == '-');
     74
     75      if (isAssignment) {
    6776        *N = *L;
    6877        free (V0);
Note: See TracChangeset for help on using the changeset viewer.