The program's command-line parsing is fairly trivial. Most of this library's exports are re-exports of parameters and procedures defined by the previous libraries. Re-exporting them from this library may reduce the number of libraries that need to be imported into subsequent libraries, but that's just a hack and it ought to be cleaned up.

      ;;; Copyright 2013 William D Clinger.
      ;;;
      ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      ;;;
      ;;;  Command-line parsing.
      ;;;
      ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      
      (library (local parse-command-line)
        (export parse-command-line
                short-file-name
                files1
                files2
                the-temporary-directory
                clear-temporary-directory!
                delete-temporary-directory!
                temporary-file
                tempfile1
                tempfile2
                tempfile3
                terminate-abnormally
                system
                current-directory
                random)
        (import (rnrs)
                (primitives system
                            current-directory
                            random)
                (local parameters)
                (local temporary-files))
    

For debugging: Click here to validate.