File tree Expand file tree Collapse file tree 3 files changed +8
-19
lines changed Expand file tree Collapse file tree 3 files changed +8
-19
lines changed Original file line number Diff line number Diff line change 497
497
(defun dist-name-pathname (name)
498
498
" Return the pathname that would be used for an installed dist with
499
499
the given NAME."
500
- (qmerge (make-pathname :directory (list* :relative
501
- " dists"
502
- (split-slashes name)))))
500
+ (qmerge (make-pathname :directory (list :relative " dists" name))))
503
501
504
502
(defmethod slot-unbound (class (dist dist) (slot (eql ' base-directory)))
505
503
(declare (ignore class ))
@@ -579,7 +577,7 @@ the given NAME."
579
577
580
578
(defun standard-dist-enumeration-function ()
581
579
" The default function used for producing a list of dist objects."
582
- (loop for file in (directory (qmerge " dists/** /distinfo.txt" ))
580
+ (loop for file in (directory (qmerge " dists/*/distinfo.txt" ))
583
581
collect (make-dist-from-file file)))
584
582
585
583
(defun all-dists ()
Original file line number Diff line number Diff line change 12
12
# :delete-file-if-exists
13
13
# :ensure-file-exists
14
14
# :split-spaces
15
- # :split-slashes
16
15
# :first-line
17
16
# :file-size
18
17
# :safely-read
Original file line number Diff line number Diff line change 56
56
(when (probe-file pathname )
57
57
(delete-file pathname )))
58
58
59
- (defun split (line delimiter )
59
+ (defun split-spaces (line)
60
60
(let ((words ' ())
61
61
(mark 0 )
62
62
(pos 0 ))
63
63
(labels ((finish ()
64
64
(setf pos (length line))
65
65
(save)
66
- (return-from split (nreverse words)))
66
+ (return-from split-spaces (nreverse words)))
67
67
(save ()
68
68
(when (< mark pos)
69
69
(push (subseq line mark pos) words)))
70
70
(mark ()
71
71
(setf mark pos))
72
72
(in-word (char )
73
- (cond
74
- ((char= char
75
- delimiter)
73
+ (case char
74
+ (#\Space
76
75
(save)
77
76
#' in-space)
78
77
(t
79
78
#' in-word)))
80
79
(in-space (char )
81
- (cond
82
- ((char= char
83
- delimiter)
80
+ (case char
81
+ (#\Space
84
82
#' in-space)
85
83
(t
86
84
(mark)
90
88
(setf pos i)
91
89
(setf state (funcall state (char line i))))))))
92
90
93
- (defun split-spaces (line)
94
- (split line #\Space ))
95
-
96
- (defun split-slashes (line)
97
- (split line #\/ ))
98
-
99
91
(defun first-line (file)
100
92
(with-open-file (stream file)
101
93
(values (read-line stream ))))
You can’t perform that action at this time.
0 commit comments