Commit 2e34df9f authored by James Prewett's avatar James Prewett
Browse files

Merge branch 'master' of lobogit.unm.edu:download/LoGS

parents 3a0cf95e c5976c89
......@@ -37,6 +37,8 @@
(defgeneric start-file-follower (file-follower)
(:documentation "get a file-follower all set up"))
(defvar *decoding-error-replacement* "DECODING ERROR")
(defmethod start-file-follower ((ff file-follower))
"Associate the file follower with the file it is supposed to be following."
(and
......@@ -53,7 +55,7 @@
(setf (Filestream ff)
(open-fifo (filename ff)))
(setf (Filestream ff)
(open (Filename ff) :direction :input)))
(open (Filename ff) :external-format `(:utf-8 :replacement ,*decoding-error-replacement*) :direction :input)))
#+cmu
(KERNEL:SIMPLE-FILE-ERROR () (warn "no access to file"))
#+sbcl
......@@ -97,13 +99,13 @@ associated with our filename. if there is, we start following that filename."
(if (peek-char nil (filestream ff) nil)
(read-line (filestream ff) nil)
(let ((stat-inode (get-inode-from-filename (filename ff))))
(and (not (eql (inode ff) stat-inode))
(read-line (start-file-follower ff) nil))))
(let ((stat-inode (get-inode-from-filename (filename ff))))
(when (or (not (eql (inode ff) stat-inode))
(not (filestream ff)))
(aif (start-file-follower ff)
(read-line it nil))))))
(and (not (eql (inode ff) stat-inode))
(read-line (start-file-follower ff) nil))))
(let ((stat-inode (get-inode-from-filename (filename ff))))
(when (or (not (eql (inode ff) stat-inode))
(not (filestream ff)))
(aif (start-file-follower ff)
(read-line it nil))))))
(defmethod get-logline ((ff file-follower))
"Wrap the next line of the file associated with the file-follower inside of
......
......@@ -23,12 +23,12 @@
(defun fifo-p (filename)
(if
(equal 4096
(logand 4096
(SB-POSIX:STAT-MODE
(sb-posix:stat
filename)))
t ()))
))
(defun open-fifo (filename)
(let ((fifofd
......
......@@ -18,6 +18,12 @@ ensure_lisp:
$(LOGS_CORE): ensure_lisp
sbcl --eval "(progn (require 'asdf) (require 'logs) (in-package :org.prewett.LoGS) (SAVE-LISP-AND-DIE \"$(LOGS_CORE)\"))"
LoGS-debug.core: ensure_lisp
sbcl --eval "(progn (defconstant +debug+ t) (require 'asdf) (require 'logs) (in-package :org.prewett.LoGS) (SAVE-LISP-AND-DIE "LoGS-debug.core"))"
LoGS-debug: LoGS-debug.core
sbcl --core LoGS-debug.core --eval "(SB-EXT:SAVE-LISP-AND-DIE \"$(LOGS_EXE)\" :executable t :save-runtime-options t :toplevel #'main)"
$(LOGS_EXE): $(LOGS_CORE)
sbcl --core $(LOGS_CORE) --eval "(SB-EXT:SAVE-LISP-AND-DIE \"$(LOGS_EXE)\" :executable t :save-runtime-options t :toplevel #'main)"
......
......@@ -63,7 +63,6 @@
(:file "environment-object")
(:file "rule")
(:file "ruleset")
(:file "hash-ruleset")
(:file "actions")
(:file "Parlance")
(:file "LoGS-command-line")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment