IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 40013 for trunk


Ignore:
Timestamp:
Apr 13, 2017, 5:39:59 AM (9 years ago)
Author:
eugene
Message:

order of operators matches convert_to_RPN.c; add missing ops , : ? %

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/libohana/src/isolate_elements.c

    r39457 r40013  
    130130      }
    131131    }
    132         myOutput = EndOfString (myOutput, &Nout, &Nchar, &NOUT, &NCHAR);
     132    myOutput = EndOfString (myOutput, &Nout, &Nchar, &NOUT, &NCHAR);
    133133  }
    134134
     
    169169int IsAnOp (char *c) {
    170170
     171  // order matches convert_to_RPN.c
     172  if (!strncmp (c, "?",  1)) return (TRUE);
     173  if (!strncmp (c, ":",  1)) return (TRUE);
     174
     175  if (!strncmp (c, "^",  1)) return (TRUE);
     176
     177  if (!strncmp (c, ",",  1)) return (TRUE);
     178  if (!strncmp (c, "@",  1)) return (TRUE);
     179  if (!strncmp (c, "/",  1)) return (TRUE);
    171180  if (!strncmp (c, "*",  1)) return (TRUE);
    172   if (!strncmp (c, "/",  1)) return (TRUE);
     181  if (!strncmp (c, "%",  1)) return (TRUE);
     182
    173183  if (!strncmp (c, "+",  1)) return (TRUE);
    174184  if (!strncmp (c, "-",  1)) return (TRUE);
    175   if (!strncmp (c, "^",  1)) return (TRUE);
    176   if (!strncmp (c, "@",  1)) return (TRUE);
     185  if (!strncmp (c, "&",  1)) return (TRUE);
     186  if (!strncmp (c, "|",  1)) return (TRUE);
     187
     188  if (!strncmp (c, "<",  1)) return (TRUE);
     189  if (!strncmp (c, ">",  1)) return (TRUE);
     190
    177191  if (!strncmp (c, "(",  1)) return (TRUE);
    178192  if (!strncmp (c, ")",  1)) return (TRUE);
    179   if (!strncmp (c, "&",  1)) return (TRUE);
    180   if (!strncmp (c, "|",  1)) return (TRUE);
    181   if (!strncmp (c, ">",  1)) return (TRUE);
    182   if (!strncmp (c, "<",  1)) return (TRUE);
    183   if (!strncmp (c, "<",  1)) return (TRUE);
     193
    184194  if (!strncmp (c, "<<", 2)) return (TRUE);
    185195  if (!strncmp (c, ">>", 2)) return (TRUE);
Note: See TracChangeset for help on using the changeset viewer.