X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/cf268da283e5971c3443e43f4dbca081d3263bd2..e43d353268fc869045f757932d78d6073db9de6e:/doc/list-exports.lisp diff --git a/doc/list-exports.lisp b/doc/list-exports.lisp index 38ec285..598d1c7 100644 --- a/doc/list-exports.lisp +++ b/doc/list-exports.lisp @@ -39,6 +39,20 @@ (symbolicate 'c- kind '-type) (symbolicate 'make- kind '-type)))) +(defmethod form-list-exports ((head (eql 'sod:defctype)) tail) + (destructuring-bind (names value &key export) tail + (declare (ignore value)) + (let ((names (if (listp names) names (list names)))) + (and export + (list* (symbolicate 'c-type- (car names)) names))))) + +(defmethod form-list-exports ((head (eql 'sod:define-simple-c-type)) tail) + (destructuring-bind (names type &key export) tail + (declare (ignore type)) + (let ((names (if (listp names) names (list names)))) + (and export + (list* (symbolicate 'c-type- (car names)) names))))) + (defmethod form-list-exports ((head (eql 'cl:macrolet)) tail) (mapcan #'form-exports (cdr tail))) @@ -362,9 +376,11 @@ (sb-mop:class-direct-slots class))) (exported (remove-if (lambda (sym) - (and (not (exported-symbol-p sym)) - (eq (symbol-package sym) - package))) + (or (not (symbol-package sym)) + (and (not (exported-symbol-p + sym)) + (eq (symbol-package sym) + package)))) slot-names))) (and exported (list (cons (class-name class) @@ -435,3 +451,8 @@ (report-symbols (mapcar #'file-name parser-files) "SOD-PARSER") (report-symbols (mapcar #'file-name (list optparse)) "OPTPARSE") (report-symbols (mapcar #'file-name (list utilities)) "SOD-UTILITIES")))) + +#+interactive +(with-open-file (*standard-output* #p"doc/SYMBOLS" :direction :output + :if-exists :supersede :if-does-not-exist :create) + (report-project-symbols))