Mercurial > hg > xemacs-beta
comparison src/search.c @ 5539:4307b8e5998c
Suppress "shadowed global" warnings for floor and ceil from <math.h>.
author | Stephen J. Turnbull <stephen@xemacs.org> |
---|---|
date | Mon, 08 Aug 2011 13:57:19 +0900 |
parents | 308d34e9f07d |
children | dab422055bab |
comparison
equal
deleted
inserted
replaced
5538:580ef98f2beb | 5539:4307b8e5998c |
---|---|
687 #endif | 687 #endif |
688 { | 688 { |
689 Raw_Ichar raw = ichar_to_raw (target, fmt, wrap_buffer (buf)); | 689 Raw_Ichar raw = ichar_to_raw (target, fmt, wrap_buffer (buf)); |
690 while (st < lim && count > 0) | 690 while (st < lim && count > 0) |
691 { | 691 { |
692 Bytebpos ceil; | 692 Bytebpos ceiling; |
693 Ibyte *bufptr; | 693 Ibyte *bufptr; |
694 | 694 |
695 ceil = BYTE_BUF_CEILING_OF (buf, st); | 695 ceiling = BYTE_BUF_CEILING_OF (buf, st); |
696 ceil = min (lim, ceil); | 696 ceiling = min (lim, ceiling); |
697 bufptr = (Ibyte *) memchr (BYTE_BUF_BYTE_ADDRESS (buf, st), | 697 bufptr = (Ibyte *) memchr (BYTE_BUF_BYTE_ADDRESS (buf, st), |
698 raw, ceil - st); | 698 raw, ceiling - st); |
699 if (bufptr) | 699 if (bufptr) |
700 { | 700 { |
701 count--; | 701 count--; |
702 st = BYTE_BUF_PTR_BYTE_POS (buf, bufptr) + 1; | 702 st = BYTE_BUF_PTR_BYTE_POS (buf, bufptr) + 1; |
703 } | 703 } |
704 else | 704 else |
705 st = ceil; | 705 st = ceiling; |
706 } | 706 } |
707 } | 707 } |
708 | 708 |
709 if (shortage) | 709 if (shortage) |
710 *shortage = count; | 710 *shortage = count; |
738 #endif | 738 #endif |
739 { | 739 { |
740 Raw_Ichar raw = ichar_to_raw (target, fmt, wrap_buffer (buf)); | 740 Raw_Ichar raw = ichar_to_raw (target, fmt, wrap_buffer (buf)); |
741 while (st > lim && count < 0) | 741 while (st > lim && count < 0) |
742 { | 742 { |
743 Bytebpos floor; | 743 Bytebpos floorpos; |
744 Ibyte *bufptr; | 744 Ibyte *bufptr; |
745 Ibyte *floorptr; | 745 Ibyte *floorptr; |
746 | 746 |
747 floor = BYTE_BUF_FLOOR_OF (buf, st); | 747 floorpos = BYTE_BUF_FLOOR_OF (buf, st); |
748 floor = max (lim, floor); | 748 floorpos = max (lim, floorpos); |
749 /* No memrchr() ... */ | 749 /* No memrchr() ... */ |
750 bufptr = BYTE_BUF_BYTE_ADDRESS_BEFORE (buf, st); | 750 bufptr = BYTE_BUF_BYTE_ADDRESS_BEFORE (buf, st); |
751 floorptr = BYTE_BUF_BYTE_ADDRESS (buf, floor); | 751 floorptr = BYTE_BUF_BYTE_ADDRESS (buf, floorpos); |
752 while (bufptr >= floorptr) | 752 while (bufptr >= floorptr) |
753 { | 753 { |
754 st--; | 754 st--; |
755 /* At this point, both ST and BUFPTR refer to the same | 755 /* At this point, both ST and BUFPTR refer to the same |
756 character. When the loop terminates, ST will | 756 character. When the loop terminates, ST will |