Function: eshell-read-passwd-file
eshell-read-passwd-file is a byte-compiled function defined in
esh-util.el.gz.
Signature
(eshell-read-passwd-file FILE)
Documentation
Return an alist correlating gids to group names in FILE.
Source Code
;; Defined in /usr/src/emacs/lisp/eshell/esh-util.el.gz
(defun eshell-read-passwd-file (file)
"Return an alist correlating gids to group names in FILE."
(let (names)
(when (file-readable-p file)
(with-temp-buffer
(insert-file-contents file)
(goto-char (point-min))
(while (not (eobp))
(let* ((fields
(split-string (buffer-substring
(point) (progn (end-of-line)
(point))) ":")))
(if (and (and fields (nth 0 fields) (nth 2 fields))
(not (assq (string-to-number (nth 2 fields)) names)))
(setq names (cons (cons (string-to-number (nth 2 fields))
(nth 0 fields))
names))))
(forward-line))))
names))