[cl-debian] Bug#314308: albert: patch available

René van Bevern rvb at pro-linux.de
Wed Jun 15 18:29:06 UTC 2005


tags 314308 patch pending
thanks

Appended is the solving patch.

	René van Bevern
		Progn.org, Pro-Linux.de
-------------- next part --------------
#! /bin/sh /usr/share/dpatch/dpatch-run
## 02-no-unknown-char-context.dpatch by René van Bevern <rvb at pro-linux.de>
##
## DP: There certainly isn't a context of 10 characters around every unknown
## DP: character in a string, this needs checking.

@DPATCH@
--- albert-0.4.10/lisp2csf/cleaning.lisp	2005-06-15 18:49:13.000000000 +0200
+++ albertalt/lisp2csf/cleaning.lisp	2005-06-15 19:53:23.000000000 +0200
@@ -144,6 +144,14 @@
 		   (t
 		    (warn "Unknown hash-char ~a [~a] [file: ~a ]" next-char (char-code next-char) fname)
 		    2))))
+
+	     (context (pos amount)
+	       (let ((end (if (< (+ pos amount) (length the-string))
+			      (+ pos amount) nil))
+		     (start (if (> (- pos amount) 0)
+				(- pos amount) 0)))
+		 (subseq the-string start end)))
+	     
 	     )
 
 
@@ -174,7 +182,7 @@
 	    (t
 	     (warn "Unknown char ~a [~a, pos: ~a, file: ~a ] {~a}"
 		   cur-char (char-code cur-char)
-		   i fname (subseq the-string (- i 5) (+ i 5)))
+		   i fname (context i 5))
 
 	     )))
 	    
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/cl-debian/attachments/20050615/2f55ce23/attachment.sig>


More information about the Cl-debian mailing list