projects
/
kmrcl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8d83106
)
r4812: Auto commit for Debian build
author
Kevin M. Rosenberg
<kevin@rosenberg.net>
Mon, 5 May 2003 20:08:17 +0000
(20:08 +0000)
committer
Kevin M. Rosenberg
<kevin@rosenberg.net>
Mon, 5 May 2003 20:08:17 +0000
(20:08 +0000)
strings.lisp
patch
|
blob
|
history
diff --git
a/strings.lisp
b/strings.lisp
index a6db99b655ddde6af58900eab8b8d289167a3bcf..96aae865c3eeb98daa34a4c147b6ebc36d4e6c59 100644
(file)
--- a/
strings.lisp
+++ b/
strings.lisp
@@
-7,7
+7,7
@@
;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: Apr 2000
;;;;
;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: Apr 2000
;;;;
-;;;; $Id: strings.lisp,v 1.1
8 2003/05/05 19:54:14
kevin Exp $
+;;;; $Id: strings.lisp,v 1.1
9 2003/05/05 20:08:17
kevin Exp $
;;;;
;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;;
;;;;
;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;;
@@
-66,23
+66,16
@@
my algorithm. Does allegro use assembly?"
(output '())
(pos 0)
(end (position separator string :start pos :end len)
(output '())
(pos 0)
(end (position separator string :start pos :end len)
- (position separator string :start pos :end len))
- (previous nil))
+ (position separator string :start pos :end len)))
((null end)
((null end)
- (cond
- ((null previous)
- (list string))
- (t
- (incf previous)
- (if (< previous len)
- (push (subseq string previous) output)
- (unless skip-terminal
- (push "" output)))
- (nreverse output))))
+ (if (< pos len)
+ (push (subseq string pos) output)
+ (unless (or skip-terminal (null output))
+ (push "" output)))
+ (nreverse output))
(declare (type fixnum pos len)
(declare (type fixnum pos len)
- (type (or null fixnum) end
previous
))
+ (type (or null fixnum) end))
(push (subseq string pos end) output)
(push (subseq string pos end) output)
- (setq previous end)
(setq pos (1+ end))))
(setq pos (1+ end))))