+ (ideographic-structure-member-compare-components
+ component (car structure))))))
+
+
+;;;###autoload
+(defun ideographic-structure-repertoire-p (structure components)
+ "Return non-nil if STRUCTURE can be constructed by a subset of COMPONENTS."
+ (and structure
+ (let (ret s-component)
+ (catch 'tag
+ (while (setq structure (cdr structure))
+ (setq s-component (car structure))
+ (unless (characterp s-component)
+ (if (setq ret (find-char s-component))
+ (setq s-component ret)))
+ (unless (cond
+ ((listp s-component)
+ (if (setq ret (assq 'ideographic-structure s-component))
+ (ideographic-structure-repertoire-p
+ (cdr ret) components)))
+ ((member* s-component components
+ :test #'ideographic-structure-char=))
+ ((setq ret
+ (get-char-attribute s-component
+ 'ideographic-structure))
+ (ideographic-structure-repertoire-p ret components)))
+ (throw 'tag nil)))
+ t))))
+
+
+(defvar ids-find-result-buffer "*ids-chars*")
+
+(defun ids-find-format-line (c v)
+ (format "%c\t%s\t%s\n"
+ c
+ (or (let ((ucs (or (char-ucs c)
+ (encode-char c 'ucs))))
+ (if ucs
+ (cond ((<= ucs #xFFFF)
+ (format " U+%04X" ucs))
+ ((<= ucs #x10FFFF)
+ (format "U-%08X" ucs)))))
+ " ")
+ (or (ideographic-structure-to-ids v)
+ v)))