             (concat [result] (search-binary-string-for-pattern b m
               endmatchindex settings)))))
       [])))
-
-(defn search-binary-string-for-pattern-old [b p settings]
-  (if (:debug settings)
-    (log-msg (format "Searching binary string for pattern %s" p)))
-  (if (re-find p b)
-    [(->SearchResult p nil 0 0 0 "" [] [])]
-    []))
 
 (defn search-binary-string [b settings]
   (if (:debug settings)

        (not (:archivesonly settings))
        (is-search-file? f settings)))))

(defn get-search-files-for-directory [d settings]
  (vec (filter #(filter-file? % settings) (get-files-in-directory d))))

(defn get-search-files [searchdirs settings]
  (apply concat (map #(get-search-files-for-directory % settings) searchdirs)))

(defn search-archive-file [f settings]
  (if (:verbose settings)

      (log-msg "")))
  (doseq [f searchfiles] (search-file f settings)))

(defn search [settings]
  (let [errs (validate-settings settings)]
    (if (empty? errs)
      (let [startfile (file (:startpath settings))
            searchfiles (if
                          (.isFile startfile) [startfile]
                          (get-search-files settings))]
        (search-files searchfiles settings))
        [])
      errs))
