| 249 | |
| 250 | |
| 251 | static dec1 *remove_leading_zeroes(const decimal_t *from, int *intg_result) |
| 252 | { |
| 253 | int intg= from->intg, i; |
| 254 | dec1 *buf0= from->buf; |
| 255 | i= ((intg - 1) % DIG_PER_DEC1) + 1; |
| 256 | while (intg > 0 && *buf0 == 0) |
| 257 | { |
| 258 | intg-= i; |
| 259 | i= DIG_PER_DEC1; |
| 260 | buf0++; |
| 261 | } |
| 262 | if (intg > 0) |
| 263 | { |
| 264 | for (i= (intg - 1) % DIG_PER_DEC1; *buf0 < powers10[i--]; intg--) ; |
| 265 | DBUG_ASSERT(intg > 0); |
| 266 | } |
| 267 | else |
| 268 | intg=0; |
| 269 | *intg_result= intg; |
| 270 | return buf0; |
| 271 | } |
| 272 | |
| 273 | |
| 274 | /* |
no outgoing calls
no test coverage detected