(cons 'realsr info-numreal)
(cons 'totalsr info-numtotal)
(cons 'lastsrch lastsearch)
- (cons 'srcheta info-searcheta))
+ (cons 'srcheta info-searcheta)
+ (cons 'srchmode (cdr (assoc 'search-mode session))))
op)
(newline op)
(close-port op))))
(define (autodl-main args)
(let ((dc-server #f) (done #f) (retval 0))
- (let ((getopt (make-getopt (cdr args) "hs:S:e:p:t:a:I:")) (arg #f))
+ (let ((getopt (make-getopt (cdr args) "whs:S:e:p:t:a:I:")) (arg #f))
(do ((arg (getopt) (getopt))) ((not (and (pair? arg) (char? (car arg)))) (set! args arg))
(cond ((eq? (car arg) #\h)
(begin (display "usage: autodl [-s server] -S sessfile\n" (current-error-port))
(write-info-file)))))
((622) ; Search result
(let ((ires (list->vector (dc-intresp resp))))
+ (if (eq? (cdr (assoc 'search-mode session)) 'wait)
+ (begin (set-cdr! (assoc 'search-mode session) 'normal)
+ (logf "reverting to normal mode")))
(if (and ires (= (vector-ref ires 0) srchid)) (apply handlesr (map (lambda (n) (vector-ref ires n)) '(1 2 3 4 5 7 8))))))
)