diff options
Diffstat (limited to 'mail-filter/scmail/files')
-rw-r--r-- | mail-filter/scmail/files/scmail-doc-encoding.diff | 28 | ||||
-rw-r--r-- | mail-filter/scmail/files/scmail-gauche-0.9.diff | 35 |
2 files changed, 63 insertions, 0 deletions
diff --git a/mail-filter/scmail/files/scmail-doc-encoding.diff b/mail-filter/scmail/files/scmail-doc-encoding.diff new file mode 100644 index 000000000000..5ed00a62d02d --- /dev/null +++ b/mail-filter/scmail/files/scmail-doc-encoding.diff @@ -0,0 +1,28 @@ +--- scmail-1.3.orig/doc/embed.scm ++++ scmail-1.3/doc/embed.scm +@@ -1,3 +1,4 @@ ++(use gauche.charconv) + (use gauche.regexp) + (define (escape str) + (set! str (regexp-replace-all #/&/ str "&")) +@@ -15,12 +16,18 @@ + (define (main args) + (call-with-input-file (cadr args) + (lambda (in) +- (let* ((content (port->string in)) ++ (let* ((content (port->string (open-input-conversion-port in "*jp"))) + (content (regexp-replace-all #/#\{(.*?)\}/ content + (lambda (m) + (string-append + "<pre>\n" + (read-file-and-escape (rxmatch-substring m 1)) +- "</pre>\n"))))) ++ "</pre>\n")))) ++ (content (regexp-replace #/(encoding=").*?(")/ content ++ (lambda (m) ++ (string-append ++ (rxmatch-substring m 1) ++ (ces-guess-from-string content "*jp") ++ (rxmatch-substring m 2)))))) + (display content)))) + 0) diff --git a/mail-filter/scmail/files/scmail-gauche-0.9.diff b/mail-filter/scmail/files/scmail-gauche-0.9.diff new file mode 100644 index 000000000000..36fc3b3daa77 --- /dev/null +++ b/mail-filter/scmail/files/scmail-gauche-0.9.diff @@ -0,0 +1,35 @@ +--- scmail-1.3.orig/scbayes.in ++++ scmail-1.3/scbayes.in +@@ -16,6 +16,7 @@ + + (use gauche.parseopt) + (use gauche.parameter) ++(use gauche.version) + (use dbm) + (use dbm.gdbm) ;; should be customizable + (use util.digest) +@@ -130,12 +131,18 @@ + (sys-rename (temporary-table-file) (table-file)) + (sys-rename (temporary-digest-file) (digest-file))))) + +-(define (lock) +- (unless (eq? (create-directory* (lock-file)) #t) +- (scmail-wformat "~a is now being updated" (table-file)) +- (scmail-wformat "or perhaps ~a is staled." (lock-file)) +- (scmail-eformat "(Please remove the lock file if it is staled.)")) +- ) ++(if (version<? (gauche-version) "0.9") ++ (define (lock) ++ (unless (eq? (create-directory* (lock-file)) #t) ++ (scmail-wformat "~a is now being updated" (table-file)) ++ (scmail-wformat "or perhaps ~a is staled." (lock-file)) ++ (scmail-eformat "(Please remove the lock file if it is staled.)"))) ++ (define (lock) ++ (guard (e (else ++ (scmail-wformat "~a is now being updated" (table-file)) ++ (scmail-wformat "or perhaps ~a is staled." (lock-file)) ++ (scmail-eformat "(Please remove the lock file if it is staled.)"))) ++ (create-directory* (lock-file))))) + + (define force-learn? (make-parameter #f)) + |