Commit be8249b5 authored by Antoine Martin's avatar Antoine Martin
Browse files

Use pathname functions instead of string manip

parent 5dca6604
...@@ -33,24 +33,18 @@ ...@@ -33,24 +33,18 @@
(build-cell (car s)) (build-cell (car s))
(build-cell (car th)))))))) (build-cell (car th))))))))
(defun format-dir-path (path) (defun all-directories (path)
(if (char= (char path (- (length path) 1)) (merge-pathnames "*/" (truename path)))
(concatenate 'string path "*.*")
(concatenate 'string path "/*.*")))
(defun get-directory-list (path) (defun get-directory-list (path)
(loop for dir in (directory (format-dir-path path)) (loop for dir in (directory (all-directories path))
collect (car (last (pathname-directory dir))))) collect (car (last (pathname-directory dir)))))
(defun format-texi-path (path) (defun all-texis (path)
(if (char= (char path (- (length path) 1)) (merge-pathnames "*/*.texi" (truename path)))
(concatenate 'string path "*/*.texi")
(concatenate 'string path "/*/*.texi")))
(defun get-texi-pathnames (path) (defun get-texi-pathnames (path)
(loop for texi in (directory (format-texi-path path)) (loop for texi in (directory (all-texis path))
collect texi)) collect texi))
(defun get-first-letter (sequence) (defun get-first-letter (sequence)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment