Deleted
Added
nxt_sprintf.c (493:745222d540a2) | nxt_sprintf.c (611:323e11065f83) |
---|---|
1 2/* 3 * Copyright (C) Igor Sysoev 4 * Copyright (C) NGINX, Inc. 5 */ 6 7#include <nxt_main.h> 8#include <math.h> --- 441 unchanged lines hidden (view full) --- 450 /* 451 * spf.width = NXT_PTR_SIZE * 2; 452 * spf.padding = '0'; 453 */ 454 goto number; 455 456 case 'c': 457 d = va_arg(args, int); | 1 2/* 3 * Copyright (C) Igor Sysoev 4 * Copyright (C) NGINX, Inc. 5 */ 6 7#include <nxt_main.h> 8#include <math.h> --- 441 unchanged lines hidden (view full) --- 450 /* 451 * spf.width = NXT_PTR_SIZE * 2; 452 * spf.padding = '0'; 453 */ 454 goto number; 455 456 case 'c': 457 d = va_arg(args, int); |
458 *buf++ = (u_char) (d & 0xff); | 458 *buf++ = (u_char) (d & 0xFF); |
459 fmt++; 460 461 continue; 462 463 case 'F': 464 fmt++; 465 466 switch (*fmt) { --- 132 unchanged lines hidden (view full) --- 599 * number of 64-bit division/remainder operations is significantly 600 * decreased depending on the 64-bit number's value, it is 601 * 0 if the 64-bit value is less than 4294967296, 602 * 1 if the 64-bit value is greater than 4294967295 603 * and less than 4294967296000000000, 604 * 2 otherwise. 605 */ 606 | 459 fmt++; 460 461 continue; 462 463 case 'F': 464 fmt++; 465 466 switch (*fmt) { --- 132 unchanged lines hidden (view full) --- 599 * number of 64-bit division/remainder operations is significantly 600 * decreased depending on the 64-bit number's value, it is 601 * 0 if the 64-bit value is less than 4294967296, 602 * 1 if the 64-bit value is greater than 4294967295 603 * and less than 4294967296000000000, 604 * 2 otherwise. 605 */ 606 |
607 if (ui64 <= 0xffffffff) { | 607 if (ui64 <= 0xFFFFFFFF) { |
608 ui32 = (uint32_t) ui64; 609 start = NULL; 610 611 } else { 612 ui32 = (uint32_t) (ui64 % 1000000000); 613 start = p - 9; 614 } 615 --- 22 unchanged lines hidden (view full) --- 638 ui64 /= 10; 639 } while (ui64 != 0); 640 641#endif 642 643 } else { 644 645 do { | 608 ui32 = (uint32_t) ui64; 609 start = NULL; 610 611 } else { 612 ui32 = (uint32_t) (ui64 % 1000000000); 613 start = p - 9; 614 } 615 --- 22 unchanged lines hidden (view full) --- 638 ui64 /= 10; 639 } while (ui64 != 0); 640 641#endif 642 643 } else { 644 645 do { |
646 *(--p) = spf->hex[ui64 & 0xf]; | 646 *(--p) = spf->hex[ui64 & 0xF]; |
647 ui64 >>= 4; 648 } while (ui64 != 0); 649 } 650 651 /* Zero or space padding. */ 652 653 if (spf->width != 0) { 654 --- 62 unchanged lines hidden --- | 647 ui64 >>= 4; 648 } while (ui64 != 0); 649 } 650 651 /* Zero or space padding. */ 652 653 if (spf->width != 0) { 654 --- 62 unchanged lines hidden --- |