fixed some formatting issues

main
m455 2018-04-03 10:22:34 -04:00
parent 7eccb1f7f7
commit 328d4c3297
1 changed files with 0 additions and 7 deletions

View File

@ -24,16 +24,13 @@
(define messages (define messages
(hash (hash
'incorrect-usage (string-append "> For usage type `" program-name " -h` or `" program-name " --help`") 'incorrect-usage (string-append "> For usage type `" program-name " -h` or `" program-name " --help`")
'file-creating (string-append "> Creating a " program-file " file in your " program-path " directory...") 'file-creating (string-append "> Creating a " program-file " file in your " program-path " directory...")
'file-creation-error (string-append "> Error: Could not create " program-file " in your " program-path " directory.\n> This may be due to directory permissions") 'file-creation-error (string-append "> Error: Could not create " program-file " in your " program-path " directory.\n> This may be due to directory permissions")
'file-already-exists (string-append "> " program-file " file already exists in " program-path) 'file-already-exists (string-append "> " program-file " file already exists in " program-path)
'file-successfully-created (string-append "> " program-path program-file " have been successfully created") 'file-successfully-created (string-append "> " program-path program-file " have been successfully created")
'file-not-found (string-append "> " program-file " has not been setup in your " program-path " directory\n> Would you like to set it up now? [y/n]") 'file-not-found (string-append "> " program-file " has not been setup in your " program-path " directory\n> Would you like to set it up now? [y/n]")
'item-added "> Added item to list" 'item-added "> Added item to list"
'item-removed "> Added item to list" 'item-removed "> Added item to list"
'terminating (string-append "> Exiting " program-name "...") 'terminating (string-append "> Exiting " program-name "...")
'choose-y/n "> Error: Please choose y or n")) 'choose-y/n "> Error: Please choose y or n"))
@ -63,7 +60,6 @@
(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-successfully-created) (d-hash-ref messages 'file-successfully-created)
(d-hash-ref messages 'file-creation-error))] (d-hash-ref messages 'file-creation-error))]
[(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)]
@ -75,13 +71,10 @@
(cond (cond
[(or (equal? args-length 0) (> args-length 2)) [(or (equal? args-length 0) (> args-length 2))
(d-hash-ref messages 'incorrect-usage)] (d-hash-ref messages 'incorrect-usage)]
[(and (equal? args-length 2) (equal? (vector-member "add" args) 0)) [(and (equal? args-length 2) (equal? (vector-member "add" args) 0))
(d-hash-ref messages 'item-added)] (d-hash-ref messages 'item-added)]
[(and (equal? args-length 2) (equal? (vector-member "remove" args) 0)) [(and (equal? args-length 2) (equal? (vector-member "remove" args) 0))
(d-hash-ref messages 'item-removed)] (d-hash-ref messages 'item-removed)]
[(and (equal? args-length 1) (equal? (vector-member "init" args) 0)) [(and (equal? args-length 1) (equal? (vector-member "init" args) 0))
(todo-list-exist?)]))) (todo-list-exist?)])))