Signed INTeger-TO-STRing: convers a long to a string * returns a pointer to a static buffer containing l in asciiz & sets len */
| 286 | /* Signed INTeger-TO-STRing: convers a long to a string |
| 287 | * returns a pointer to a static buffer containing l in asciiz & sets len */ |
| 288 | static inline char* sint2str(long l, int* len) |
| 289 | { |
| 290 | int sign; |
| 291 | char *p; |
| 292 | |
| 293 | sign = 0; |
| 294 | if(l<0) { |
| 295 | sign = 1; |
| 296 | l = -l; |
| 297 | } |
| 298 | p = int2str((unsigned long)l, len); |
| 299 | if(sign) { |
| 300 | *(--p) = '-'; |
| 301 | if (len) (*len)++; |
| 302 | } |
| 303 | return p; |
| 304 | } |
| 305 | |
| 306 | #define DOUBLE2STR_MAX_LEN INT2STR_MAX_LEN |
| 307 | static inline char* double2str(double d, int* len) |
no test coverage detected