| 256 | } |
| 257 | |
| 258 | txBoolean fxIsCanonicalIndex(txMachine* the, txID id) |
| 259 | { |
| 260 | txSlot* key = fxGetKey(the, id); |
| 261 | if (key->flag & XS_DONT_ENUM_FLAG) { |
| 262 | txString string = key->value.key.string; |
| 263 | char buffer[256], c; |
| 264 | txNumber number; |
| 265 | c = c_read8(string); |
| 266 | if (('+' != c) && ('-' != c) && ('.' != c) && ('I' != c) && ('N' != c) && !(('0' <= c) && ('9' >= c))) |
| 267 | return 0; |
| 268 | number = fxStringToNumber(the, string, 1); |
| 269 | if (number == -0) |
| 270 | return 1; |
| 271 | fxNumberToString(the, number, buffer, sizeof(buffer), 0, 0); |
| 272 | if (!c_strcmp(string, buffer)) { |
| 273 | return 1; |
| 274 | } |
| 275 | } |
| 276 | return 0; |
| 277 | } |
| 278 | |
| 279 | int fxStringGetter(void* theStream) |
| 280 | { |
no test coverage detected