IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 24, 2005, 3:44:00 PM (21 years ago)
Author:
eugene
Message:

allow quoted strings in math

File:
1 edited

Legend:

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

    r3029 r3318  
    8989      /* operators */
    9090      if (negate || minus || posate || plus || (IsAnOp (&in[i][j]) && !SciNotation)) {
    91         if (posate) goto skip3;
     91        if (posate) continue;
    9292        EndOfString ();
    9393        /* copy operator to out[Nout] */
     
    100100        }
    101101        EndOfString ();
     102        continue;
     103      }
     104      /* quoted string */
     105      if (in[i][j] == '"') {
     106        InsertValue (in[i][j]);
     107        j++;
     108        while ((j < strlen(in[i])) && (in[i][j] != '"')) {
     109          InsertValue (in[i][j]);
     110          j++;
     111        }
     112        if (in[i][j] != '"') continue;
     113        /*
     114          fprintf (stderr, "mismatched quotes\n");
     115          return (FALSE);
     116        }
     117        */
     118        InsertValue (in[i][j]);
     119        EndOfString ();
     120        continue;
     121      }
     122      /* not an operator, not a quoted string */
     123      if (!whitespace (in[i][j])) {
     124        InsertValue (in[i][j]);
    102125      } else {
    103         if (!whitespace (in[i][j])) {
    104           InsertValue (in[i][j]);
    105         } else {
    106           EndOfString ();
    107         }
    108       }
    109     skip3:
    110       continue;
     126        EndOfString ();
     127      }
    111128    }
    112129    EndOfString ();
Note: See TracChangeset for help on using the changeset viewer.