aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-03-16 00:49:54 -0700
committerPaul Eggert2011-03-16 00:49:54 -0700
commit612f56dfff305bae8b6e61ea3a60502f42a8eb5b (patch)
treea8b04015bde19922cebd516a61ee8abd921dde50 /src
parent2a80c887c75a89f23efcb0c565454647e4f96570 (diff)
downloademacs-612f56dfff305bae8b6e61ea3a60502f42a8eb5b.tar.gz
emacs-612f56dfff305bae8b6e61ea3a60502f42a8eb5b.zip
* fns.c (Ffillarray): Rename locals to avoid shadowing.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog1
-rw-r--r--src/fns.c18
2 files changed, 10 insertions, 9 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 0e8e33ee53a..adac111aa19 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,6 +1,7 @@
12011-03-16 Paul Eggert <eggert@cs.ucla.edu> 12011-03-16 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 * fns.c (require_nesting_list, require_unwind): Now static. 3 * fns.c (require_nesting_list, require_unwind): Now static.
4 (Ffillarray): Rename locals to avoid shadowing.
4 5
5 * floatfns.c (domain_error2): Define only if needed. 6 * floatfns.c (domain_error2): Define only if needed.
6 (Ffrexp, Fldexp): Rename locals to avoid shadowing. 7 (Ffrexp, Fldexp): Rename locals to avoid shadowing.
diff --git a/src/fns.c b/src/fns.c
index ebbebdd9ee0..71f49b9cdae 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -2133,15 +2133,15 @@ DEFUN ("fillarray", Ffillarray, Sfillarray, 2, 2, 0,
2133ARRAY is a vector, string, char-table, or bool-vector. */) 2133ARRAY is a vector, string, char-table, or bool-vector. */)
2134 (Lisp_Object array, Lisp_Object item) 2134 (Lisp_Object array, Lisp_Object item)
2135{ 2135{
2136 register EMACS_INT size, index; 2136 register EMACS_INT size, idx;
2137 int charval; 2137 int charval;
2138 2138
2139 if (VECTORP (array)) 2139 if (VECTORP (array))
2140 { 2140 {
2141 register Lisp_Object *p = XVECTOR (array)->contents; 2141 register Lisp_Object *p = XVECTOR (array)->contents;
2142 size = ASIZE (array); 2142 size = ASIZE (array);
2143 for (index = 0; index < size; index++) 2143 for (idx = 0; idx < size; idx++)
2144 p[index] = item; 2144 p[idx] = item;
2145 } 2145 }
2146 else if (CHAR_TABLE_P (array)) 2146 else if (CHAR_TABLE_P (array))
2147 { 2147 {
@@ -2177,8 +2177,8 @@ ARRAY is a vector, string, char-table, or bool-vector. */)
2177 *p++ = str[i % len]; 2177 *p++ = str[i % len];
2178 } 2178 }
2179 else 2179 else
2180 for (index = 0; index < size; index++) 2180 for (idx = 0; idx < size; idx++)
2181 p[index] = charval; 2181 p[idx] = charval;
2182 } 2182 }
2183 else if (BOOL_VECTOR_P (array)) 2183 else if (BOOL_VECTOR_P (array))
2184 { 2184 {
@@ -2188,14 +2188,14 @@ ARRAY is a vector, string, char-table, or bool-vector. */)
2188 / BOOL_VECTOR_BITS_PER_CHAR); 2188 / BOOL_VECTOR_BITS_PER_CHAR);
2189 2189
2190 charval = (! NILP (item) ? -1 : 0); 2190 charval = (! NILP (item) ? -1 : 0);
2191 for (index = 0; index < size_in_chars - 1; index++) 2191 for (idx = 0; idx < size_in_chars - 1; idx++)
2192 p[index] = charval; 2192 p[idx] = charval;
2193 if (index < size_in_chars) 2193 if (idx < size_in_chars)
2194 { 2194 {
2195 /* Mask out bits beyond the vector size. */ 2195 /* Mask out bits beyond the vector size. */
2196 if (XBOOL_VECTOR (array)->size % BOOL_VECTOR_BITS_PER_CHAR) 2196 if (XBOOL_VECTOR (array)->size % BOOL_VECTOR_BITS_PER_CHAR)
2197 charval &= (1 << (XBOOL_VECTOR (array)->size % BOOL_VECTOR_BITS_PER_CHAR)) - 1; 2197 charval &= (1 << (XBOOL_VECTOR (array)->size % BOOL_VECTOR_BITS_PER_CHAR)) - 1;
2198 p[index] = charval; 2198 p[idx] = charval;
2199 } 2199 }
2200 } 2200 }
2201 else 2201 else