about summary refs log tree commit diff
path: root/users/sterni/mblog/mblog.lisp
diff options
context:
space:
mode:
authorsterni <sternenseemann@systemli.org>2022-07-04T13·56+0200
committerclbot <clbot@tvl.fyi>2022-07-05T15·01+0000
commit49aee7a8f283069a3b47a2617a448389fe8c4373 (patch)
treeb6d2102124ad161a4f047c656e76b89a499b61d1 /users/sterni/mblog/mblog.lisp
parentc08e47903e19e9a5ea397430e690680d91c5a9ac (diff)
chore: remove sclf from the tree r/4275
SCLF is quite a big utility library (almost 3€ LOC) with limited
portability (CMUCL, SBCL and CLISP to an extent). Continuing to maintain
it is an unnecessary burden, as depot only uses a fraction of it which
is now inlined into the respective users (mime4cl and mblog).

In the future trimming down ex-sclf.lisp may make sense either by
refactoring the code that uses it or by moving interesting utilities
into e.g. klatre.

Change-Id: I2e73825b6bfa372e97847f25c30731a5aad4a1b5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5922
Tested-by: BuildkiteCI
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: sterni <sternenseemann@systemli.org>
Diffstat (limited to 'users/sterni/mblog/mblog.lisp')
-rw-r--r--users/sterni/mblog/mblog.lisp16
1 files changed, 16 insertions, 0 deletions
diff --git a/users/sterni/mblog/mblog.lisp b/users/sterni/mblog/mblog.lisp
index 1f971bc121d2..4ca0df2392a1 100644
--- a/users/sterni/mblog/mblog.lisp
+++ b/users/sterni/mblog/mblog.lisp
@@ -1,7 +1,23 @@
+;; SPDX-License-Identifier: MIT AND LGPL-2.1-or-later
+;; SPDX-FileCopyrightText: Copyright (C) 2006-2010 by Walter C. Pelissero
+;; SPDX-FileCopyrightText: Copyright (C) 2022 by sterni
 (in-package :mblog)
 
 ;; util
 
+;; Taken from SCLF, written by Walter C. Pelissero
+(defun pathname-as-directory (pathname)
+  "Converts PATHNAME to directory form and return it."
+  (setf pathname (pathname pathname))
+  (if (pathname-name pathname)
+      (make-pathname :directory (append (or (pathname-directory pathname)
+                                            '(:relative))
+                                        (list (file-namestring pathname)))
+                     :name nil
+                     :type nil
+                     :defaults pathname)
+      pathname))
+
 (defmacro with-overwrite-file ((&rest args) &body body)
   "Like WITH-OPEN-FILE, but creates/supersedes the given file for writing."
   `(with-open-file (,@args :direction :output