| 372 | } |
| 373 | |
| 374 | inline static int int2reverse_hex( char **c, int *size, unsigned int nr ) |
| 375 | { |
| 376 | unsigned short digit; |
| 377 | |
| 378 | if (*size && nr==0) { |
| 379 | **c = '0'; |
| 380 | (*c)++; |
| 381 | (*size)--; |
| 382 | return 1; |
| 383 | } |
| 384 | |
| 385 | while (*size && nr ) { |
| 386 | digit = nr & 0xf ; |
| 387 | **c= digit >= 10 ? digit + 'a' - 10 : digit + '0'; |
| 388 | nr >>= 4; |
| 389 | (*c)++; |
| 390 | (*size)--; |
| 391 | } |
| 392 | return nr ? -1 /* number not processed; too little space */ : 1; |
| 393 | } |
| 394 | |
| 395 | /* same functions, higher representation 64 bit*/ |
| 396 | /* if unsafe requested when first non numerical character shall be |
no outgoing calls
no test coverage detected