diff options
author | dos-reis <gdr@axiomatics.org> | 2013-06-01 07:35:18 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2013-06-01 07:35:18 +0000 |
commit | 64aeafac79d72f440b6546bae91583e6efd6b674 (patch) | |
tree | de419861e4625d20bc0e1c68f5db1590a50708b9 /src/lisp | |
parent | de3a19c35df30298d323c5882e39931f329ea29e (diff) | |
download | open-axiom-64aeafac79d72f440b6546bae91583e6efd6b674.tar.gz |
Support --output in compiler, for bootstrapping stage.
Diffstat (limited to 'src/lisp')
-rw-r--r-- | src/lisp/core.lisp.in | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/lisp/core.lisp.in b/src/lisp/core.lisp.in index 38183144..4b72e76f 100644 --- a/src/lisp/core.lisp.in +++ b/src/lisp/core.lisp.in @@ -3,7 +3,7 @@ ;; Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd. ;; All rights reserved. ;; -;; Copyright (C) 2007-2012, Gabriel Dos Reis. +;; Copyright (C) 2007-2013, Gabriel Dos Reis. ;; All rights reserved. ;; ;; Redistribution and use in source and binary forms, with or without @@ -103,7 +103,8 @@ "$InputStream" "$OutputStream" "$ErrorStream" - + + "directoryEntries" "inputBinaryFile" "outputBinaryFile" "inputTextFile" @@ -551,6 +552,22 @@ (defparameter |$OutputStream| (make-synonym-stream '*standard-output*)) (defparameter |$ErrorStream| (make-synonym-stream '*standard-output*)) +;; Return all entries (except dot and dot-dot) in a directory +(defun |directoryEntries| (dir &optional (pattern nil)) + (let ((dirname (namestring dir))) + (cond (pattern (directory (concatenate 'string dirname "/" pattern))) + (t ;; list everything. + ;; There are two groups: those who do the right and obvious thing; + ;; and those that are anal-retentive about it. + #+(or :clisp :clozure :gcl) + (directory (concatenate 'string dirname "/*")) + #-(or :clisp :clozure :gcl) + (nunion + (directory (concatenate 'string dirname "/*")) + (directory (concatenate 'string dirname "/*.*"))))))) + + + (defun |inputBinaryFile| (f) (open f :direction :input |