Changeset 911
- Timestamp:
- Feb 16, 2005, 11:11:15 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/ccl/lib/apropos.lisp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ccl/lib/apropos.lisp
r6 r911 138 138 (blen (length b))) 139 139 (declare (fixnum alen blen) (optimize (speed 3)(safety 0))) 140 (if *apropos-case-sensitive-p* 141 (dotimes (i (the fixnum (%imin blen (%i+ 1 (%i- blen alen))))) 142 (declare (fixnum i)) 143 (when (eq (%schar b i) chara0) 144 (when 145 (do ((j 1 (1+ j))) 146 ((>= j alen) t) 147 (declare (fixnum j)) 148 (when (neq (%schar a j)(%schar b (%i+ j i))) 149 (return nil))) 150 (return (%i- blen i alen))))) 151 (dotimes (i (the fixnum (%imin blen (%i+ 1 (%i- blen alen))))) 152 (declare (fixnum i)) 153 (when (eq (char-upcase (%schar b i)) (char-upcase chara0)) 154 (when 155 (do ((j 1 (1+ j))) 156 ((>= j alen) t) 157 (declare (fixnum j)) 158 (unless (eq (char-upcase (%schar a j)) (char-upcase (%schar b (%i+ j i)))) 159 (return nil))) 160 (return (%i- blen i alen)))))))) 140 (if (= alen 0) ; "" is substring of every string 141 t 142 (if *apropos-case-sensitive-p* 143 (dotimes (i (the fixnum (%imin blen (%i+ 1 (%i- blen alen))))) 144 (declare (fixnum i)) 145 (when (eq (%schar b i) chara0) 146 (when 147 (do ((j 1 (1+ j))) 148 ((>= j alen) t) 149 (declare (fixnum j)) 150 (when (neq (%schar a j)(%schar b (%i+ j i))) 151 (return nil))) 152 (return (%i- blen i alen))))) 153 (dotimes (i (the fixnum (%imin blen (%i+ 1 (%i- blen alen))))) 154 (declare (fixnum i)) 155 (when (eq (char-upcase (%schar b i)) (char-upcase chara0)) 156 (when 157 (do ((j 1 (1+ j))) 158 ((>= j alen) t) 159 (declare (fixnum j)) 160 (unless (eq (char-upcase (%schar a j)) (char-upcase (%schar b (%i+ j i)))) 161 (return nil))) 162 (return (%i- blen i alen))))))))) 161 163 162 164
Note:
See TracChangeset
for help on using the changeset viewer.
