X-Git-Url: https://git.distorted.org.uk/~mdw/zone/blobdiff_plain/8bd2576ecb4dc8c7ba9d917021d923af40320b5e..a567a3bce51edcee4bd83afd9eea82ea42b2ce1f:/frontend.lisp diff --git a/frontend.lisp b/frontend.lisp index ef9c090..46c5a36 100644 --- a/frontend.lisp +++ b/frontend.lisp @@ -30,6 +30,8 @@ (defvar opt-zones nil "Which zones to be emitted.") +(defvar opt-format :bind + "Which format to use on output.") (eval-when (:compile-toplevel :load-toplevel) (defopthandler dir (var arg) () @@ -54,6 +56,20 @@ (#\d "directory" (:arg "DIRECTORY") (dir *zone-output-path*) "Write zone and serial files to DIRECTORY.") + (#\F "format" (:arg "FORMAT") + (keyword opt-format + (delete-duplicates + (loop for method in + (pcl:generic-function-methods + #'zone:zone-write) + for specs = + (pcl:method-specializers method) + if (typep (car specs) + 'pcl:eql-specializer) + collect + (pcl:eql-specializer-object + (car specs))))) + "Format to use for output.") (#\z "zone" (:arg "NAME") (list opt-zones) "Write information about zone NAME."))) @@ -72,6 +88,6 @@ :use '(#:common-lisp #:net #:zone)))) (load f :verbose nil :print nil :if-does-not-exist :error) (delete-package *package*))) - (zone-save opt-zones)))) + (zone-save opt-zones :format opt-format)))) ;;;----- That's all, folks --------------------------------------------------