From: Paul Eggert Date: Tue, 15 Mar 2011 18:02:42 +0000 (-0700) Subject: * character.h (INC_POS, DEC_POS): Rename locals to avoid shadowing. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~554^2~71 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7e47afad4513977ba3cc5a175081f1c258a8ddfe;p=emacs.git * character.h (INC_POS, DEC_POS): Rename locals to avoid shadowing. --- diff --git a/src/ChangeLog b/src/ChangeLog index 9f5ed0a0c31..d4f8061ed02 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-15 Paul Eggert + * character.h (INC_POS, DEC_POS): Rename locals to avoid shadowing. + * indent.c (MULTIBYTE_BYTES_WIDTH): New args bytes, width. All uses changed. (MULTIBYTE_BYTES_WIDTH, scan_for_column, compute_motion): diff --git a/src/character.h b/src/character.h index 6d5b8110109..bbf5550c711 100644 --- a/src/character.h +++ b/src/character.h @@ -451,8 +451,8 @@ along with GNU Emacs. If not, see . */ #define INC_POS(pos_byte) \ do { \ - unsigned char *p = BYTE_POS_ADDR (pos_byte); \ - pos_byte += BYTES_BY_CHAR_HEAD (*p); \ + unsigned char *ptr = BYTE_POS_ADDR (pos_byte); \ + pos_byte += BYTES_BY_CHAR_HEAD (*ptr); \ } while (0) @@ -461,16 +461,16 @@ along with GNU Emacs. If not, see . */ #define DEC_POS(pos_byte) \ do { \ - unsigned char *p; \ + unsigned char *ptr; \ \ pos_byte--; \ if (pos_byte < GPT_BYTE) \ - p = BEG_ADDR + pos_byte - BEG_BYTE; \ + ptr = BEG_ADDR + pos_byte - BEG_BYTE; \ else \ - p = BEG_ADDR + GAP_SIZE + pos_byte - BEG_BYTE;\ - while (!CHAR_HEAD_P (*p)) \ + ptr = BEG_ADDR + GAP_SIZE + pos_byte - BEG_BYTE; \ + while (!CHAR_HEAD_P (*ptr)) \ { \ - p--; \ + ptr--; \ pos_byte--; \ } \ } while (0)