changed some parameter names
parent
1f98bbd8c4
commit
69d94542b2
6
rodo.rkt
6
rodo.rkt
|
@ -51,7 +51,7 @@
|
||||||
(close-output-port opened-file))))
|
(close-output-port opened-file))))
|
||||||
|
|
||||||
;; talk with user if something goes wrong/right
|
;; talk with user if something goes wrong/right
|
||||||
(define (prompt-initialize chosen-message)
|
(define (prompt-user chosen-message)
|
||||||
(d-hash-ref messages chosen-message)
|
(d-hash-ref messages chosen-message)
|
||||||
(display "> ")
|
(display "> ")
|
||||||
(let ([user-input (read-line)])
|
(let ([user-input (read-line)])
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
[(member user-input (hash-ref y/n 'no))
|
[(member user-input (hash-ref y/n 'no))
|
||||||
(d-hash-ref messages 'terminating)]
|
(d-hash-ref messages 'terminating)]
|
||||||
[else
|
[else
|
||||||
(prompt-initialize 'choose-y/n)])))
|
(prompt-user 'choose-y/n)])))
|
||||||
|
|
||||||
(define (check-args args)
|
(define (check-args args)
|
||||||
(let ([args-length (vector-length args)])
|
(let ([args-length (vector-length args)])
|
||||||
|
@ -85,7 +85,7 @@
|
||||||
(define (todo-list-exist?)
|
(define (todo-list-exist?)
|
||||||
(if (file-exists? (expand-user-path (string-append program-path program-file)))
|
(if (file-exists? (expand-user-path (string-append program-path program-file)))
|
||||||
(d-hash-ref messages 'file-already-exists)
|
(d-hash-ref messages 'file-already-exists)
|
||||||
(prompt-initialize 'file-not-found)))
|
(prompt-user 'file-not-found)))
|
||||||
|
|
||||||
(define (main)
|
(define (main)
|
||||||
(check-args (current-command-line-arguments)))
|
(check-args (current-command-line-arguments)))
|
||||||
|
|
Loading…
Reference in New Issue