Changeset 42821 for trunk/Ohana/src/opihi/lib.shell/stack_math.c
- Timestamp:
- May 8, 2025, 4:29:52 PM (12 months ago)
- Location:
- trunk/Ohana
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/opihi/lib.shell/stack_math.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana
- Property svn:mergeinfo changed
-
trunk/Ohana/src/opihi/lib.shell/stack_math.c
r42389 r42821 1615 1615 int i, Nx; 1616 1616 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 1617 1623 Nx = V1[0].vector[0].Nelements; 1618 1624 1619 1625 OUT[0].vector = InitVector (); 1620 1626 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 }1629 1627 1630 1628 # define V_FUNC(OP,FTYPE) { \ … … 1744 1742 for (int i = 0; i < Nx; i++) { 1745 1743 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 } 1746 1762 } 1747 1763 goto escape;
Note:
See TracChangeset
for help on using the changeset viewer.
