IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 8, 2025, 4:29:52 PM (12 months ago)
Author:
eugene
Message:

merge changes from eam_branches/ipp-20230313

Location:
trunk/Ohana
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana

  • trunk/Ohana/src/opihi/lib.shell/stack_math.c

    r42389 r42821  
    16151615  int i, Nx;
    16161616 
     1617  // handle string vectors in the L_unary function
     1618  if (V1->vector->type == OPIHI_STR) {
     1619    int status = L_unary (OUT, V1, op);
     1620    return status;
     1621  }
     1622
    16171623  Nx = V1[0].vector[0].Nelements;
    16181624
    16191625  OUT[0].vector = InitVector ();
    16201626  OUT[0].type = ST_VECTOR_TMP; /*** <<--- says this is a temporary matrix ***/
    1621 
    1622   if (V1->vector->type == OPIHI_STR) {
    1623     ResetVector (OUT->vector, V1->vector->type, V1->vector->Nelements);
    1624     for (i = 0; i < V1->vector->Nelements; i++) {
    1625       OUT->vector->elements.Str[i] = strcreate (V1->vector->elements.Str[i]);
    1626     }
    1627     goto escape;
    1628   }
    16291627
    16301628# define V_FUNC(OP,FTYPE) {                                             \
     
    17441742    for (int i = 0; i < Nx; i++) {                     
    17451743      Ov[i] = strcreate (Iv[i]);
     1744    }                                                                   
     1745    goto escape;                                                       
     1746  }
     1747  if (!strcmp (op, "toupper")) {
     1748    for (int i = 0; i < Nx; i++) {                     
     1749      Ov[i] = strcreate (Iv[i]);
     1750      for (int j = 0; Ov[i][j]; j++) {
     1751        Ov[i][j] = toupper ((unsigned int) Ov[i][j]);
     1752      }
     1753    }                                                                   
     1754    goto escape;                                                       
     1755  }
     1756  if (!strcmp (op, "tolower")) {
     1757    for (int i = 0; i < Nx; i++) {                     
     1758      Ov[i] = strcreate (Iv[i]);
     1759      for (int j = 0; Ov[i][j]; j++) {
     1760        Ov[i][j] = tolower ((unsigned int) Ov[i][j]);
     1761      }
    17461762    }                                                                   
    17471763    goto escape;                                                       
Note: See TracChangeset for help on using the changeset viewer.