(else (error "Illegal state in uuencode decoder:" state))))
(define (process-begin-line line)
- (if (not (re-string-match "^begin +[0-7]+ +.+$" line))
+ (if (not (regsexp-match-string decode-uue:begin-line-regsexp line))
(error:decode-uue "Malformed \"begin\" line:" line))
(set! state 'normal))
(error "Illegal uuencode char:" char))
(fix:and (fix:- n #x20) #x3F)))
+(define decode-uue:begin-line-regsexp
+ (compile-regsexp
+ '(seq (line-start)
+ "begin"
+ (+ #\space)
+ (+ (char-set (48 . 56)))
+ (+ #\space)
+ (+ (any-char))
+ (line-end))))
+
(define (call-with-decode-uue-output-port port text? generator)
(let ((port (make-decode-uue-port port text?)))
(let ((v (generator port)))