diff options
Diffstat (limited to 'src/fns.c')
| -rw-r--r-- | src/fns.c | 25 |
1 files changed, 11 insertions, 14 deletions
| @@ -57,9 +57,6 @@ Lisp_Object Qcodeset, Qdays, Qmonths, Qpaper; | |||
| 57 | 57 | ||
| 58 | static int internal_equal (Lisp_Object , Lisp_Object, int, int); | 58 | static int internal_equal (Lisp_Object , Lisp_Object, int, int); |
| 59 | 59 | ||
| 60 | extern long get_random (void); | ||
| 61 | extern void seed_random (long); | ||
| 62 | |||
| 63 | #ifndef HAVE_UNISTD_H | 60 | #ifndef HAVE_UNISTD_H |
| 64 | extern long time (); | 61 | extern long time (); |
| 65 | #endif | 62 | #endif |
| @@ -2136,15 +2133,15 @@ DEFUN ("fillarray", Ffillarray, Sfillarray, 2, 2, 0, | |||
| 2136 | ARRAY is a vector, string, char-table, or bool-vector. */) | 2133 | ARRAY is a vector, string, char-table, or bool-vector. */) |
| 2137 | (Lisp_Object array, Lisp_Object item) | 2134 | (Lisp_Object array, Lisp_Object item) |
| 2138 | { | 2135 | { |
| 2139 | register EMACS_INT size, index; | 2136 | register EMACS_INT size, idx; |
| 2140 | int charval; | 2137 | int charval; |
| 2141 | 2138 | ||
| 2142 | if (VECTORP (array)) | 2139 | if (VECTORP (array)) |
| 2143 | { | 2140 | { |
| 2144 | register Lisp_Object *p = XVECTOR (array)->contents; | 2141 | register Lisp_Object *p = XVECTOR (array)->contents; |
| 2145 | size = ASIZE (array); | 2142 | size = ASIZE (array); |
| 2146 | for (index = 0; index < size; index++) | 2143 | for (idx = 0; idx < size; idx++) |
| 2147 | p[index] = item; | 2144 | p[idx] = item; |
| 2148 | } | 2145 | } |
| 2149 | else if (CHAR_TABLE_P (array)) | 2146 | else if (CHAR_TABLE_P (array)) |
| 2150 | { | 2147 | { |
| @@ -2180,8 +2177,8 @@ ARRAY is a vector, string, char-table, or bool-vector. */) | |||
| 2180 | *p++ = str[i % len]; | 2177 | *p++ = str[i % len]; |
| 2181 | } | 2178 | } |
| 2182 | else | 2179 | else |
| 2183 | for (index = 0; index < size; index++) | 2180 | for (idx = 0; idx < size; idx++) |
| 2184 | p[index] = charval; | 2181 | p[idx] = charval; |
| 2185 | } | 2182 | } |
| 2186 | else if (BOOL_VECTOR_P (array)) | 2183 | else if (BOOL_VECTOR_P (array)) |
| 2187 | { | 2184 | { |
| @@ -2191,14 +2188,14 @@ ARRAY is a vector, string, char-table, or bool-vector. */) | |||
| 2191 | / BOOL_VECTOR_BITS_PER_CHAR); | 2188 | / BOOL_VECTOR_BITS_PER_CHAR); |
| 2192 | 2189 | ||
| 2193 | charval = (! NILP (item) ? -1 : 0); | 2190 | charval = (! NILP (item) ? -1 : 0); |
| 2194 | for (index = 0; index < size_in_chars - 1; index++) | 2191 | for (idx = 0; idx < size_in_chars - 1; idx++) |
| 2195 | p[index] = charval; | 2192 | p[idx] = charval; |
| 2196 | if (index < size_in_chars) | 2193 | if (idx < size_in_chars) |
| 2197 | { | 2194 | { |
| 2198 | /* Mask out bits beyond the vector size. */ | 2195 | /* Mask out bits beyond the vector size. */ |
| 2199 | if (XBOOL_VECTOR (array)->size % BOOL_VECTOR_BITS_PER_CHAR) | 2196 | if (XBOOL_VECTOR (array)->size % BOOL_VECTOR_BITS_PER_CHAR) |
| 2200 | 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; |
| 2201 | p[index] = charval; | 2198 | p[idx] = charval; |
| 2202 | } | 2199 | } |
| 2203 | } | 2200 | } |
| 2204 | else | 2201 | else |
| @@ -2601,9 +2598,9 @@ particular subfeatures supported in this version of FEATURE. */) | |||
| 2601 | 2598 | ||
| 2602 | /* List of features currently being require'd, innermost first. */ | 2599 | /* List of features currently being require'd, innermost first. */ |
| 2603 | 2600 | ||
| 2604 | Lisp_Object require_nesting_list; | 2601 | static Lisp_Object require_nesting_list; |
| 2605 | 2602 | ||
| 2606 | Lisp_Object | 2603 | static Lisp_Object |
| 2607 | require_unwind (Lisp_Object old_value) | 2604 | require_unwind (Lisp_Object old_value) |
| 2608 | { | 2605 | { |
| 2609 | return require_nesting_list = old_value; | 2606 | return require_nesting_list = old_value; |