Function: FLAG-LIST

Documentation

returns a list of flags, which byte pattern is found in value

Source

(defun flag-list (value &key
		  (flag-system *current-flag-system*)
		  flags)
  "returns a list of flags, which byte pattern is found in value"
  (let ((ret (list)))
    (if flags
	(mapc (lambda (key)
		(when (has-flag value key flag-system)
		  (push key ret)))
	      flags)
	(maphash (lambda (key val)
		   (when (= val (logand val value))
		     (push key ret)))
		 (flag-system-flags flag-system)))
    ret))
Source Context