summaryrefslogtreecommitdiffstats
path: root/transact.scm
diff options
context:
space:
mode:
authorThomas Bushnell, BSG <tb@debian.org>2005-11-02 14:55:21 -0800
committerBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:32 -0800
commit34c54a22ff7818bb8b38ef4d9c87dbbcb221ba73 (patch)
tree1189d06a81277bcf8539b0260a69a19f6038effb /transact.scm
parent611b3db17894e5fdc0db3d49eaf6743d27b44233 (diff)
parent5145dd3aa0c02c9fc496d1432fc4410674206e1d (diff)
downloadslib-34c54a22ff7818bb8b38ef4d9c87dbbcb221ba73.tar.gz
slib-34c54a22ff7818bb8b38ef4d9c87dbbcb221ba73.zip
Import Debian changes 3a2-1debian/3a2-1
slib (3a2-1) unstable; urgency=low * New upstream release. * Acknowledge NMU. (Closes: #281809) * Makefile: Don't hack Makefile; use rules instead. * debian/rules: Set on make invocations: prefix, htmldir, TEXI2HTML. * debian/rules (clean): Clean more stuff here. * Makefile: Comment out old rule for $(htmldir)slib_toc.html. Instead, specify directly that the texi2html invocation produces that file. * debian/rules (binary-indep): Find web files in slib subdir. * debian/control (Build-Depends-Indep): Go back to using scm.
Diffstat (limited to 'transact.scm')
-rw-r--r--transact.scm13
1 files changed, 7 insertions, 6 deletions
diff --git a/transact.scm b/transact.scm
index 59a06fe..83b37a7 100644
--- a/transact.scm
+++ b/transact.scm
@@ -90,7 +90,7 @@
"~$" (substring file (min 2 (max 0 (- filen 10))) filen)))))
(define (word-lock:certificate lockpath)
- (define iport (open-file lockpath "rb"))
+ (define iport (and (file-exists? lockpath) (open-file lockpath 'rb)))
(and
iport
(call-with-open-ports
@@ -143,7 +143,7 @@
(cond ((and conflict (substring? "-> " conflict))
=> (lambda (idx)
(substring conflict (+ 3 idx) (string-length conflict))))
- (conflict (slib:error 'bad 'emacs 'lock lockpath conflict))
+ ((and conflict (not (equal? conflict ""))) (slib:error 'bad 'emacs 'lock lockpath conflict))
(else #f)))
(define (file-lock:certificate path)
@@ -165,13 +165,13 @@
(define at (substring? "@" email))
(let ((user (substring email 0 at))
(hostname (substring email (+ 1 at) (string-length email)))
- (oport (open-file lockpath "wb")))
+ (oport (open-file lockpath 'wb)))
(define userlen (string-length user))
(and oport (call-with-open-ports
oport (lambda (oport)
(define pos 1)
(define (nulls cnt)
- (display (make-bytes cnt 0) oport)
+ (write-bytes (make-bytes cnt 0) cnt oport)
(set! pos (+ cnt pos)))
(define (write-field field)
(define len (string-length field))
@@ -227,7 +227,8 @@
(case (software-type)
((UNIX COHERENT PLAN9)
;; file-system may not support symbolic links.
- (or (emacs:lock! path email) wl))
+ (or (and (provided? 'current-time) (emacs:lock! path email))
+ wl))
(else wl)))))
;;@body
@@ -434,7 +435,7 @@
(sscanf line " Workstation Domain %s" workgroup)
(sscanf line " Workgroup %s" workgroup)
(sscanf line " User name %s" user)))))))
-
+
(and netdir (not (and user hostname))
(set! netdir (string-append netdir "\\system.ini"))
(file-exists? netdir)