| 176 | } |
| 177 | |
| 178 | void PiuCodeDictionary(xsMachine* the, void* it) |
| 179 | { |
| 180 | PiuCode* self = it; |
| 181 | xsSlot* slot; |
| 182 | xsStringValue string; |
| 183 | if (!xsFindResult(xsArg(1), xsID_string)) |
| 184 | xsResult = xsString(""); |
| 185 | slot = PiuString(xsResult); |
| 186 | string = PiuToString(slot); |
| 187 | (*self)->string = slot; |
| 188 | (*self)->length = fxUnicodeLength(string, (xsIntegerValue*)&((*self)->size)); |
| 189 | if (xsFindString(xsArg(1), xsID_type, &string)) { |
| 190 | if (!c_strcmp(string, "js")) |
| 191 | (*self)->type = 1; |
| 192 | else if (!c_strcmp(string, "json")) |
| 193 | (*self)->type = 2; |
| 194 | else if (!c_strcmp(string, "xml")) |
| 195 | (*self)->type = 3; |
| 196 | } |
| 197 | PiuCodeFormat(self); |
| 198 | PiuCodeSearch(self, (*self)->size); |
| 199 | PiuCodeSelect(self, 0, 0); |
| 200 | } |
| 201 | |
| 202 | void PiuCodeIntersect(int32_t l1, int32_t r1, int32_t l2, int32_t r2, int32_t segments[6]) |
| 203 | { |
no test coverage detected