diff options
| author | Paul Eggert | 2011-03-16 14:40:51 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-03-16 14:40:51 -0700 |
| commit | 0902fe454066bb22a1c3874bb8d58693f39b78df (patch) | |
| tree | 153bc9c92453af29ba5a16dbf49b072bf201804b /src | |
| parent | a6670b0ba2834d8996162596a55e09b1428e4ee6 (diff) | |
| download | emacs-0902fe454066bb22a1c3874bb8d58693f39b78df.tar.gz emacs-0902fe454066bb22a1c3874bb8d58693f39b78df.zip | |
* lread.c (Fload, readevalloop, read1): Rename locals to avoid shadowing.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 1 | ||||
| -rw-r--r-- | src/lread.c | 58 |
2 files changed, 30 insertions, 29 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index e68f478cb40..95cbf19dbd4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | Rename locals to avoid shadowing. | 4 | Rename locals to avoid shadowing. |
| 5 | 5 | ||
| 6 | * lread.c (read1): Rewrite so as not to use empty "else". | 6 | * lread.c (read1): Rewrite so as not to use empty "else". |
| 7 | (Fload, readevalloop, read1): Rename locals to avoid shadowing. | ||
| 7 | 8 | ||
| 8 | * print.c (Fredirect_debugging_output): Fix pointer signedess. | 9 | * print.c (Fredirect_debugging_output): Fix pointer signedess. |
| 9 | 10 | ||
diff --git a/src/lread.c b/src/lread.c index a287ed0e4bd..a5fd1513c39 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -1020,10 +1020,10 @@ Return t if the file exists and loads successfully. */) | |||
| 1020 | Also, just loading a file recursively is not always an error in | 1020 | Also, just loading a file recursively is not always an error in |
| 1021 | the general case; the second load may do something different. */ | 1021 | the general case; the second load may do something different. */ |
| 1022 | { | 1022 | { |
| 1023 | int count = 0; | 1023 | int load_count = 0; |
| 1024 | Lisp_Object tem; | 1024 | Lisp_Object tem; |
| 1025 | for (tem = Vloads_in_progress; CONSP (tem); tem = XCDR (tem)) | 1025 | for (tem = Vloads_in_progress; CONSP (tem); tem = XCDR (tem)) |
| 1026 | if (!NILP (Fequal (found, XCAR (tem))) && (++count > 3)) | 1026 | if (!NILP (Fequal (found, XCAR (tem))) && (++load_count > 3)) |
| 1027 | { | 1027 | { |
| 1028 | if (fd >= 0) | 1028 | if (fd >= 0) |
| 1029 | emacs_close (fd); | 1029 | emacs_close (fd); |
| @@ -1654,8 +1654,8 @@ readevalloop (Lisp_Object readcharfun, | |||
| 1654 | to a different value when evaluated. */ | 1654 | to a different value when evaluated. */ |
| 1655 | if (BUFFERP (readcharfun)) | 1655 | if (BUFFERP (readcharfun)) |
| 1656 | { | 1656 | { |
| 1657 | struct buffer *b = XBUFFER (readcharfun); | 1657 | struct buffer *buf = XBUFFER (readcharfun); |
| 1658 | if (BUF_PT (b) == BUF_ZV (b)) | 1658 | if (BUF_PT (buf) == BUF_ZV (buf)) |
| 1659 | continue_reading_p = 0; | 1659 | continue_reading_p = 0; |
| 1660 | } | 1660 | } |
| 1661 | } | 1661 | } |
| @@ -2674,7 +2674,7 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list) | |||
| 2674 | { | 2674 | { |
| 2675 | char *p = read_buffer; | 2675 | char *p = read_buffer; |
| 2676 | char *end = read_buffer + read_buffer_size; | 2676 | char *end = read_buffer + read_buffer_size; |
| 2677 | register int c; | 2677 | register int ch; |
| 2678 | /* Nonzero if we saw an escape sequence specifying | 2678 | /* Nonzero if we saw an escape sequence specifying |
| 2679 | a multibyte character. */ | 2679 | a multibyte character. */ |
| 2680 | int force_multibyte = 0; | 2680 | int force_multibyte = 0; |
| @@ -2684,8 +2684,8 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list) | |||
| 2684 | int cancel = 0; | 2684 | int cancel = 0; |
| 2685 | int nchars = 0; | 2685 | int nchars = 0; |
| 2686 | 2686 | ||
| 2687 | while ((c = READCHAR) >= 0 | 2687 | while ((ch = READCHAR) >= 0 |
| 2688 | && c != '\"') | 2688 | && ch != '\"') |
| 2689 | { | 2689 | { |
| 2690 | if (end - p < MAX_MULTIBYTE_LENGTH) | 2690 | if (end - p < MAX_MULTIBYTE_LENGTH) |
| 2691 | { | 2691 | { |
| @@ -2696,44 +2696,44 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list) | |||
| 2696 | end = read_buffer + read_buffer_size; | 2696 | end = read_buffer + read_buffer_size; |
| 2697 | } | 2697 | } |
| 2698 | 2698 | ||
| 2699 | if (c == '\\') | 2699 | if (ch == '\\') |
| 2700 | { | 2700 | { |
| 2701 | int modifiers; | 2701 | int modifiers; |
| 2702 | 2702 | ||
| 2703 | c = read_escape (readcharfun, 1); | 2703 | ch = read_escape (readcharfun, 1); |
| 2704 | 2704 | ||
| 2705 | /* C is -1 if \ newline has just been seen */ | 2705 | /* CH is -1 if \ newline has just been seen */ |
| 2706 | if (c == -1) | 2706 | if (ch == -1) |
| 2707 | { | 2707 | { |
| 2708 | if (p == read_buffer) | 2708 | if (p == read_buffer) |
| 2709 | cancel = 1; | 2709 | cancel = 1; |
| 2710 | continue; | 2710 | continue; |
| 2711 | } | 2711 | } |
| 2712 | 2712 | ||
| 2713 | modifiers = c & CHAR_MODIFIER_MASK; | 2713 | modifiers = ch & CHAR_MODIFIER_MASK; |
| 2714 | c = c & ~CHAR_MODIFIER_MASK; | 2714 | ch = ch & ~CHAR_MODIFIER_MASK; |
| 2715 | 2715 | ||
| 2716 | if (CHAR_BYTE8_P (c)) | 2716 | if (CHAR_BYTE8_P (ch)) |
| 2717 | force_singlebyte = 1; | 2717 | force_singlebyte = 1; |
| 2718 | else if (! ASCII_CHAR_P (c)) | 2718 | else if (! ASCII_CHAR_P (ch)) |
| 2719 | force_multibyte = 1; | 2719 | force_multibyte = 1; |
| 2720 | else /* i.e. ASCII_CHAR_P (c) */ | 2720 | else /* i.e. ASCII_CHAR_P (ch) */ |
| 2721 | { | 2721 | { |
| 2722 | /* Allow `\C- ' and `\C-?'. */ | 2722 | /* Allow `\C- ' and `\C-?'. */ |
| 2723 | if (modifiers == CHAR_CTL) | 2723 | if (modifiers == CHAR_CTL) |
| 2724 | { | 2724 | { |
| 2725 | if (c == ' ') | 2725 | if (ch == ' ') |
| 2726 | c = 0, modifiers = 0; | 2726 | ch = 0, modifiers = 0; |
| 2727 | else if (c == '?') | 2727 | else if (ch == '?') |
| 2728 | c = 127, modifiers = 0; | 2728 | ch = 127, modifiers = 0; |
| 2729 | } | 2729 | } |
| 2730 | if (modifiers & CHAR_SHIFT) | 2730 | if (modifiers & CHAR_SHIFT) |
| 2731 | { | 2731 | { |
| 2732 | /* Shift modifier is valid only with [A-Za-z]. */ | 2732 | /* Shift modifier is valid only with [A-Za-z]. */ |
| 2733 | if (c >= 'A' && c <= 'Z') | 2733 | if (ch >= 'A' && ch <= 'Z') |
| 2734 | modifiers &= ~CHAR_SHIFT; | 2734 | modifiers &= ~CHAR_SHIFT; |
| 2735 | else if (c >= 'a' && c <= 'z') | 2735 | else if (ch >= 'a' && ch <= 'z') |
| 2736 | c -= ('a' - 'A'), modifiers &= ~CHAR_SHIFT; | 2736 | ch -= ('a' - 'A'), modifiers &= ~CHAR_SHIFT; |
| 2737 | } | 2737 | } |
| 2738 | 2738 | ||
| 2739 | if (modifiers & CHAR_META) | 2739 | if (modifiers & CHAR_META) |
| @@ -2741,7 +2741,7 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list) | |||
| 2741 | /* Move the meta bit to the right place for a | 2741 | /* Move the meta bit to the right place for a |
| 2742 | string. */ | 2742 | string. */ |
| 2743 | modifiers &= ~CHAR_META; | 2743 | modifiers &= ~CHAR_META; |
| 2744 | c = BYTE8_TO_CHAR (c | 0x80); | 2744 | ch = BYTE8_TO_CHAR (ch | 0x80); |
| 2745 | force_singlebyte = 1; | 2745 | force_singlebyte = 1; |
| 2746 | } | 2746 | } |
| 2747 | } | 2747 | } |
| @@ -2749,20 +2749,20 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list) | |||
| 2749 | /* Any modifiers remaining are invalid. */ | 2749 | /* Any modifiers remaining are invalid. */ |
| 2750 | if (modifiers) | 2750 | if (modifiers) |
| 2751 | error ("Invalid modifier in string"); | 2751 | error ("Invalid modifier in string"); |
| 2752 | p += CHAR_STRING (c, (unsigned char *) p); | 2752 | p += CHAR_STRING (ch, (unsigned char *) p); |
| 2753 | } | 2753 | } |
| 2754 | else | 2754 | else |
| 2755 | { | 2755 | { |
| 2756 | p += CHAR_STRING (c, (unsigned char *) p); | 2756 | p += CHAR_STRING (ch, (unsigned char *) p); |
| 2757 | if (CHAR_BYTE8_P (c)) | 2757 | if (CHAR_BYTE8_P (ch)) |
| 2758 | force_singlebyte = 1; | 2758 | force_singlebyte = 1; |
| 2759 | else if (! ASCII_CHAR_P (c)) | 2759 | else if (! ASCII_CHAR_P (ch)) |
| 2760 | force_multibyte = 1; | 2760 | force_multibyte = 1; |
| 2761 | } | 2761 | } |
| 2762 | nchars++; | 2762 | nchars++; |
| 2763 | } | 2763 | } |
| 2764 | 2764 | ||
| 2765 | if (c < 0) | 2765 | if (ch < 0) |
| 2766 | end_of_file_error (); | 2766 | end_of_file_error (); |
| 2767 | 2767 | ||
| 2768 | /* If purifying, and string starts with \ newline, | 2768 | /* If purifying, and string starts with \ newline, |