| 1321 | } |
| 1322 | |
| 1323 | void fxEchoBigInt(txMachine* the, txBigInt* bigint) |
| 1324 | { |
| 1325 | int i = bigint->size - 1; |
| 1326 | if (i < 0) { |
| 1327 | fxEchoCharacter(the, 'N'); |
| 1328 | fxEchoCharacter(the, 'a'); |
| 1329 | fxEchoCharacter(the, 'N'); |
| 1330 | } |
| 1331 | else { |
| 1332 | int echo = 0; |
| 1333 | if (bigint->sign) |
| 1334 | fxEchoCharacter(the, '-'); |
| 1335 | fxEchoCharacter(the, '0'); |
| 1336 | fxEchoCharacter(the, 'x'); |
| 1337 | while (i >= 0) { |
| 1338 | txU4 value = bigint->data[i]; |
| 1339 | txU4 mask = 0xF; |
| 1340 | int shift = 28; |
| 1341 | while (shift >= 0) { |
| 1342 | char digit = c_read8(gxHexaDigits + ((value & (mask << shift)) >> shift)); |
| 1343 | if (echo || (digit != '0')) { |
| 1344 | echo = 1; |
| 1345 | fxEchoCharacter(the, digit); |
| 1346 | } |
| 1347 | shift -= 4; |
| 1348 | } |
| 1349 | i--; |
| 1350 | } |
| 1351 | if (!echo) |
| 1352 | fxEchoCharacter(the, '0'); |
| 1353 | fxEchoCharacter(the, 'n'); |
| 1354 | } |
| 1355 | } |
| 1356 | |
| 1357 | void fxEchoCharacter(txMachine* the, char theCharacter) |
| 1358 | { |
no test coverage detected