{{{  about
; This package provides four functions which can be used  to  manage  disk
; collections. There are two functions for each disk drive, one that gives
; a complete (recursive) directory  listing  and  one  that  gives a short
; (flat)  directory  listing.  The  function  reads  a  directory  of  the
; specified disk drive, puts it  into  a  fold  and places the name of the
; disk together with the free  disk space in the fold header. This part n
; the function  depends  on  the output format of the MUPFEL 'df' utility,
; which looks like:
;
; Laufwerk A:   692 K benutzt,    99 K frei,   791 K insgesamt (FOO)
;
; where FOO is the disk name. If you want to use other df's, you will have
; to modify the code a bit.
;
; if the macro-library-file kill-mark is included befor this file, the
; modified kill-buffer-handling is used.
; if the macro-library-file move-mark is included befor this file, the
; modified move-buffer-handling is used.
}}}
@if-using not(DISKLIST)
  @use (DISKLIST)
  {{{  libs
  {{{F fun/append
  :::F fun/append
  }}}
  {{{F fun/mt-fold
  :::F fun/mt-fold
  }}}
  {{{F fun/go-match
  :::F fun/go-match
  }}}
  }}}
  {{{  read-info-a
  (deffun read-info-a (
    create-fold
    create-fold
    open-fold
    next-line
    pipe-from-command "ls "  "-alFR "  "a:  newline-and-indent
    pipe-from-command "df "  "a:            newline-and-indent
    previous-line
    end-of-line
    backward-character
    if test-char ")
    (
      goto-matching-fence
      newline-and-indent
      delete-character
      end-of-line
      delete-previous-character
    ) else (
      forward-character
      newline-and-indent
      "(no "name ")
    )fi
    previous-line
    beginning-of-line
    incremental-search-forward "K " "benutzt, newline-and-indent
    forward-character forward-character forward-character forward-character
    forward-character forward-character forward-character forward-character
    forward-character forward-character
    newline-and-indent
    previous-line
    @if-using (KILL-MARK) kill-line- @fi @if-using not(KILL-MARK) kill-line @fi
    incremental-search-forward ", newline-and-indent
    delete-to-end-of-line
    @if-using (MOVE-MARK) move-line- @fi @if-using not(MOVE-MARK) move-line @fi
    next-line
    @if-using (MOVE-MARK) move-line- @fi @if-using not(MOVE-MARK) move-line @fi
    append-to-previous-line
    "  "  "   ;
    @if-using (MOVE-MARK) move-line- @fi @if-using not(MOVE-MARK) move-line @fi
    mtool-top
    next-line
    @if-using (MOVE-MARK) move-line- @fi @if-using not(MOVE-MARK) move-line @fi
    close-fold
    auto-header
    open-fold
    next-line
    @if-using (KILL-MARK) kill-line- @fi @if-using not(KILL-MARK) kill-line @fi
    close-fold
    beginning-of-line
    next-line
  ))
  }}}
  {{{  read-info-b
  (deffun read-info-b (
    create-fold
    create-fold
    open-fold
    next-line
    pipe-from-command "ls "  "-alFR "  "b:  newline-and-indent
    pipe-from-command "df "  "b:            newline-and-indent
    previous-line
    end-of-line
    backward-character
    if test-char ")
    (
      goto-matching-fence
      newline-and-indent
      delete-character
      end-of-line
      delete-previous-character
    ) else (
      forward-character
      newline-and-indent
      "(no "name ")
    )fi
    previous-line
    beginning-of-line
    incremental-search-forward "K " "benutzt, newline-and-indent
    forward-character forward-character forward-character forward-character
    forward-character forward-character forward-character forward-character
    forward-character forward-character
    newline-and-indent
    previous-line
    @if-using (KILL-MARK) kill-line- @fi @if-using not(KILL-MARK) kill-line @fi
    incremental-search-forward ", newline-and-indent
    delete-to-end-of-line
    @if-using (MOVE-MARK) move-line- @fi @if-using not(MOVE-MARK) move-line @fi
    next-line
    @if-using (MOVE-MARK) move-line- @fi @if-using not(MOVE-MARK) move-line @fi
    append-to-previous-line
    "  "  "   ;
    @if-using (MOVE-MARK) move-line- @fi @if-using not(MOVE-MARK) move-line @fi
    mtool-top
    next-line
    @if-using (MOVE-MARK) move-line- @fi @if-using not(MOVE-MARK) move-line @fi
    close-fold
    auto-header
    open-fold
    next-line
    @if-using (KILL-MARK) kill-line- @fi @if-using not(KILL-MARK) kill-line @fi
    close-fold
    beginning-of-line
    next-line
  ))
  }}}
  {{{  read-short-info-a
  (deffun read-short-info-a (
    create-fold
    create-fold
    open-fold
    next-line
    pipe-from-command "ls "  "-alF "  "a:  newline-and-indent
    pipe-from-command "df "  "a:           newline-and-indent
    previous-line
    end-of-line
    backward-character
    if test-char ")
    (
      goto-matching-fence
      newline-and-indent
      delete-character
      end-of-line
      delete-previous-character
    ) else (
      forward-character
      newline-and-indent
      "(no "name ")
    )fi
    previous-line
    beginning-of-line
    incremental-search-forward "K " "benutzt, newline-and-indent
    forward-character forward-character forward-character forward-character
    forward-character forward-character forward-character forward-character
    forward-character forward-character
    newline-and-indent
    previous-line
    @if-using (KILL-MARK) kill-line- @fi @if-using not(KILL-MARK) kill-line @fi
    incremental-search-forward ", newline-and-indent
    delete-to-end-of-line
    @if-using (MOVE-MARK) move-line- @fi @if-using not(MOVE-MARK) move-line @fi
    next-line
    @if-using (MOVE-MARK) move-line- @fi @if-using not(MOVE-MARK) move-line @fi
    append-to-previous-line
    "  "  "   ;
    @if-using (MOVE-MARK) move-line- @fi @if-using not(MOVE-MARK) move-line @fi
    mtool-top
    next-line
    @if-using (MOVE-MARK) move-line- @fi @if-using not(MOVE-MARK) move-line @fi
    close-fold
    auto-header
    open-fold
    next-line
    @if-using (KILL-MARK) kill-line- @fi @if-using not(KILL-MARK) kill-line @fi
    close-fold
    beginning-of-line
    next-line
  ))
  }}}
  {{{  read-short-info-b
  (deffun read-short-info-b (
    create-fold
    create-fold
    open-fold
    next-line
    pipe-from-command "ls "  "-alF "  "b:  newline-and-indent
    pipe-from-command "df "  "b:           newline-and-indent
    previous-line
    end-of-line
    backward-character
    if test-char ")
    (
      goto-matching-fence
      newline-and-indent
      delete-character
      end-of-line
      delete-previous-character
    ) else (
      forward-character
      newline-and-indent
      "(no "name ")
    )fi
    previous-line
    beginning-of-line
    incremental-search-forward "K " "benutzt, newline-and-indent
    forward-character forward-character forward-character forward-character
    forward-character forward-character forward-character forward-character
    forward-character forward-character
    newline-and-indent
    previous-line
    @if-using (KILL-MARK) kill-line- @fi @if-using not(KILL-MARK) kill-line @fi
    incremental-search-forward ", newline-and-indent
    delete-to-end-of-line
    @if-using (MOVE-MARK) move-line- @fi @if-using not(MOVE-MARK) move-line @fi
    next-line
    @if-using (MOVE-MARK) move-line- @fi @if-using not(MOVE-MARK) move-line @fi
    append-to-previous-line
    "  "  "   ;
    @if-using (MOVE-MARK) move-line- @fi @if-using not(MOVE-MARK) move-line @fi
    mtool-top
    next-line
    @if-using (MOVE-MARK) move-line- @fi @if-using not(MOVE-MARK) move-line @fi
    close-fold
    auto-header
    open-fold
    next-line
    @if-using (KILL-MARK) kill-line- @fi @if-using not(KILL-MARK) kill-line @fi
    close-fold
    beginning-of-line
    next-line
  ))
  }}}
@fi
