IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 23, 2004, 7:36:01 AM (22 years ago)
Author:
eugene
Message:

fixed dvomath for strings

File:
1 edited

Legend:

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

    r2792 r2801  
    5656    if (*V1 == 0) goto error;
    5757
     58    /* command replacement.  execute the line, place answer in val. */
    5859    if (*V1 == '`') {
    59       /* command replacement.  execute the line, place answer in val. */
    6060
    6161      /* look for end of line, must be ` */
     
    7979        if (*B == '\n') *B = ' ';
    8080      }
    81     } else {
     81    }
     82
     83    /* simple variable assignment */
     84    if (*V1 != '`') {
    8285      /* dvomath returns a new string, or NULL, with the result of the expression */
    8386      val = dvomath (1, &V1, &size, 0);
     
    107110    V = strncreate (N+1, L - N - 1);
    108111
    109     /* expand value in parenthesis */
     112    /* expand value in brackets */
    110113    val = dvomath (1, &V, &size, 0);
    111114    if (val == NULL) {
     
    172175    *c1 = 0;
    173176
    174     /* value in brackets must be an expression of some sort */
     177    /* value in brackets must be a math expression of some sort.
     178       isolated words are not valid here */
    175179    val = dvomath (1, &L, &size, -1);
    176180    if (val == NULL) {
Note: See TracChangeset for help on using the changeset viewer.