Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
g000001 committed Mar 10, 2020
1 parent e18555e commit 5ef2cbc
Show file tree
Hide file tree
Showing 8 changed files with 265 additions and 158 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.*~
*.*fasl
24 changes: 24 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.

In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

For more information, please refer to <https://unlicense.org>
5 changes: 3 additions & 2 deletions README.org → README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
* SRFI 47: Array
- Copyright (C) 2001, 2003, 2005, 2006 Aubrey Jaffer
# SRFI 47 for CL: Array

* Copyright (C) 2001, 2003, 2005, 2006 Aubrey Jaffer

Permission to copy this software, to modify it, to redistribute it,
to distribute modified versions, and to use it for any purpose is
Expand Down
40 changes: 27 additions & 13 deletions package.lisp
Original file line number Diff line number Diff line change
@@ -1,19 +1,33 @@
;;;; package.lisp

(cl:in-package :cl-user)
(cl:in-package cl-user)

(defpackage :srfi-47

(defpackage "https://github.com/g000001/srfi-47"
(:use)
(:export
:array? :make-array :make-shared-array :ac64 :ac32 :ar64 :ar32 :as64 :as32
:as16 :as8 :au64 :au32 :au16 :au8 :at1 :array-rank :array-dimensions
:array-in-bounds? :array-ref :array-set!))
array? make-array make-shared-array ac64 ac32 ar64 ar32 as64 as32
as16 as8 au64 au32 au16 au8 at1 array-rank array-dimensions
array-in-bounds? array-ref array-set!))


(defpackage "https://github.com/g000001/srfi-47#internals"
(:use
"https://github.com/g000001/srfi-47"
"https://github.com/g000001/srfi-23"
"https://github.com/g000001/srfi-9"
"https://github.com/g000001/srfi-4"
cl
fiveam)
(:shadowing-import-from
"https://github.com/g000001/srfi-23"
error)
(:shadowing-import-from
"https://github.com/g000001/srfi-47"
array-rank
array-dimensions
make-array )
(:shadow lambda loop assoc map member))


(defpackage :srfi-47.internal
(:use :srfi-47 :cl :fiveam :srfi-9)
(:shadowing-import-from :srfi-23 :error)
(:shadowing-import-from :srfi-47
:array-rank
:array-dimensions
:make-array )
(:shadow :lambda :loop :assoc :map :member))
;;; *EOF*
38 changes: 31 additions & 7 deletions srfi-47.asd
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,43 @@

(cl:in-package :asdf)


(defsystem :srfi-47
:version "20200311"
:description "SRFI 47 for CL: Array"
:long-description "SRFI 47 for CL: Array
https://srfi.schemers.org/srfi-47"
:author "Aubrey Jaffer"
:maintainer "CHIBA Masaomi"
:serial t
:depends-on (:fiveam :srfi-9 :srfi-23 :srfi-4)
:components ((:file "package")
(:file "util")
(:file "srfi-47")
(:file "test")))


(defmethod perform :after ((o load-op) (c (eql (find-system :srfi-47))))
(let ((name "https://github.com/g000001/srfi-47")
(nickname :srfi-47))
(if (and (find-package nickname)
(not (eq (find-package nickname)
(find-package name))))
(warn "~A: A package with name ~A already exists." name nickname)
(rename-package name name `(,nickname)))))


(defmethod perform ((o test-op) (c (eql (find-system :srfi-47))))
(load-system :srfi-47)
(or (flet ((_ (pkg sym)
(intern (symbol-name sym) (find-package pkg))))
(let ((result (funcall (_ :fiveam :run) (_ :srfi-47.internal :srfi-47))))
(funcall (_ :fiveam :explain!) result)
(funcall (_ :fiveam :results-status) result)))
(error "test-op failed") ))
(let ((*package*
(find-package
"https://github.com/g000001/srfi-47#internals")))
(eval
(read-from-string
"
(or (let ((result (run 'srfi-47)))
(explain! result)
(results-status result))
(error \"test-op failed\") )"))))


;;; *EOF*
Loading

0 comments on commit 5ef2cbc

Please sign in to comment.