                                   (set dll-names)
                                   (do-not-build)
                                   helper-vcprojs))))
-     
+
 (defn device-pages []
   (let [index-txt (slurp "http://valelab.ucsf.edu/~MM/MMwiki/index.php/Device%20Support")]
     (map second (re-seq #"a href=\"/~MM/MMwiki/index.php/(.*?)\"" index-txt))))

        one-hour-ago (doto (Calendar/getInstance)
                       (.add Calendar/HOUR -1))]
    (.format format (.getTime one-hour-ago))))
    
(defn result-file [bits mode]
  (File. micromanager (str "/results" bits ".txt")))

(defn visual-studio-errors [result-text]
  (map first
       (re-seq #"\n[^\n]+\b([1-9]|[0-9][1-9]|[0-9][0-9][1-9])\b\serror\(s\)[^\n]+\n" result-text)))

(defn visual-studio-error-info [result-text errors]
  (for [error errors]
    (let [prefix (ffirst (re-seq #"\n([1-9]|[0-9][1-9]|[0-9][0-9][1-9])>" error))
          pattern (re-pattern (str prefix "[^\\n]+"))]
      (when prefix
          (re-seq (re-pattern pattern) result-text)))))

(defn visual-studio-error-text [result-text]
  (->> (visual-studio-error-info result-text (visual-studio-errors result-text))
       (interpose "\n")
       flatten
       (apply str)))

(defn javac-errors [result-text]
  (map first

(defn report-build-errors [bits mode test]
  (let [f (result-file bits mode)
        result-txt (slurp f)
        vs-errors (visual-studio-errors)
        outdated-dlls (map #(.getName %) (old-dlls (bin-dir bits) 24))
        javac-errs (javac-errors result-txt)
        outdated-jars (map #(.getName %)
