| | 1667 | #if 0 |
| | 1668 | #ifdef LANG_THUNE |
| | 1669 | if( argc == 2 ) |
| | 1670 | { |
| | 1671 | UCell* pc = ur_s_prev(tos); |
| | 1672 | |
| | 1673 | ur_initType(res, UT_STRING); |
| | 1674 | ur_sliceDT(res) = ur_type(tos); |
| | 1675 | res->series.n = tos->series.n; |
| | 1676 | |
| | 1677 | if( ur_is(tos, UT_STRING) ) |
| | 1678 | ur_encoding(res) = ur_encoding(tos); |
| | 1679 | if( ur_isASeries(pc) ) |
| | 1680 | { |
| | 1681 | _setSliceRange( res, pc->series.it, tos->series.it ); |
| | 1682 | } |
| | 1683 | else if( ur_is(pc, UT_COORD) ) |
| | 1684 | { |
| | 1685 | int a, b; |
| | 1686 | |
| | 1687 | a = pc->coord.elem[0]; |
| | 1688 | b = pc->coord.elem[1]; |
| | 1689 | if( a < 1 ) |
| | 1690 | a = 0; |
| | 1691 | else |
| | 1692 | --a; |
| | 1693 | if( b < 1 ) |
| | 1694 | { |
| | 1695 | UString* str = ur_bin(tos); |
| | 1696 | b += ur_sliceEnd(tos, str); |
| | 1697 | } |
| | 1698 | else |
| | 1699 | --b; |
| | 1700 | |
| | 1701 | _setSliceRange( res, a, b ); |
| | 1702 | } |
| | 1703 | } |
| | 1704 | else |
| | 1705 | #endif |
| | 1706 | #endif |
| 1775 | | break; |
| 1776 | | |
| 1777 | | case UT_SLICE: |
| 1778 | | if( ur_isASeries(tos) ) |
| 1779 | | { |
| 1780 | | ur_initType(res, UT_SLICE); |
| 1781 | | ur_sliceDT(res) = ur_type(tos); |
| 1782 | | res->series.n = tos->series.n; |
| 1783 | | |
| 1784 | | if( ur_is(tos, UT_STRING) ) |
| 1785 | | ur_encoding(res) = ur_encoding(tos); |
| 1786 | | |
| 1787 | | if( argc == 2 ) |
| 1788 | | { |
| 1789 | | UCell* pc = ur_s_prev(tos); |
| 1790 | | if( ur_isASeries(pc) ) |
| 1791 | | { |
| 1792 | | _setSliceRange( res, pc->series.it, tos->series.it ); |
| 1793 | | } |
| 1794 | | else if( ur_is(pc, UT_COORD) ) |
| 1795 | | { |
| 1796 | | _setSliceRange( res, pc->coord.elem[0] - 1, |
| 1797 | | pc->coord.elem[1] - 1 ); |
| 1798 | | } |
| 1799 | | } |
| 1800 | | else |
| 1801 | | { |
| 1802 | | res->slice.it = tos->series.it; |
| 1803 | | res->slice.end = -1; |
| 1804 | | } |
| 1805 | | } |