| 1784 | } |
| 1785 | |
| 1786 | void fx_parseQueryPlus(txMachine* the, txSlot* string, txInteger from, txInteger to) |
| 1787 | { |
| 1788 | txString src; |
| 1789 | txString limit; |
| 1790 | txInteger length; |
| 1791 | txInteger c, d; |
| 1792 | txString dst; |
| 1793 | src = string->value.string + from; |
| 1794 | limit = string->value.string + to; |
| 1795 | length = 0; |
| 1796 | while (src < limit) { |
| 1797 | c = c_read8(src++); |
| 1798 | if (c == '%') |
| 1799 | fxParseHexEscape(&src, &d); |
| 1800 | length++; |
| 1801 | } |
| 1802 | length += 1; |
| 1803 | mxPushUndefined(); |
| 1804 | the->stack->value.string = fxNewChunk(the, length); |
| 1805 | the->stack->kind = XS_STRING_KIND; |
| 1806 | src = string->value.string + from; |
| 1807 | limit = string->value.string + to; |
| 1808 | dst = the->stack->value.string; |
| 1809 | while ((src < limit)) { |
| 1810 | c = c_read8(src++); |
| 1811 | if (c == '%') { |
| 1812 | if (fxParseHexEscape(&src, &d)) |
| 1813 | *dst++ = (char)d; |
| 1814 | else |
| 1815 | *dst++ = '%'; |
| 1816 | } |
| 1817 | else if (c == '+') |
| 1818 | *dst++ = ' '; |
| 1819 | else |
| 1820 | *dst++ = (char)c; |
| 1821 | } |
| 1822 | *dst = 0; |
| 1823 | } |
| 1824 | |
| 1825 | void fx_serializeQuery(txMachine* the) |
| 1826 | { |
no test coverage detected