Parcourir la source

Clean up code

 - Improve message
 - Remove useless spaces
Leo il y a 10 ans
Parent
commit
81193b4861
3 fichiers modifiés avec 4 ajouts et 4 suppressions
  1. 1 1
      src/const.ml
  2. 2 2
      src/exec_cmd.ml
  3. 1 1
      src/tmp_file.ml

+ 1 - 1
src/const.ml

@@ -41,7 +41,7 @@ open Core.Std;;
 (* Get current home *)
 (* Get current home *)
 let home = match (Sys.getenv "HOME") with
 let home = match (Sys.getenv "HOME") with
   | Some x -> x
   | Some x -> x
-  | None -> failwith "Wrong value for home"
+  | None -> failwith "Wrong value for home\n"
 ;;
 ;;
 
 
 (* Some settings variales *)
 (* Some settings variales *)

+ 2 - 2
src/exec_cmd.ml

@@ -43,7 +43,7 @@ let num_cmd_to_cmd ~cmd_list number =
   then
   then
       begin
       begin
           (* TODO Make this printing configurable *)
           (* TODO Make this printing configurable *)
-          printf "Out of range. All has been launched!";
+          printf "Out of range. All has been launched!\n";
           ""
           ""
       end
       end
   else
   else
@@ -60,7 +60,7 @@ let num_cmd_to_cmd ~cmd_list number =
 let what_next ~cmd_list =
 let what_next ~cmd_list =
   let tmp_file = Tmp_file.read () in
   let tmp_file = Tmp_file.read () in
   num_cmd_to_cmd ~cmd_list:cmd_list tmp_file.number
   num_cmd_to_cmd ~cmd_list:cmd_list tmp_file.number
-  ;;
+;;
 
 
 (* Display an error message if command can't run
 (* Display an error message if command can't run
  * if 0 status, do nothing
  * if 0 status, do nothing

+ 1 - 1
src/tmp_file.ml

@@ -123,5 +123,5 @@ let reset cmd_num=
     | n when n > 0 ->
     | n when n > 0 ->
             (* Set the number *)
             (* Set the number *)
             log ~func:((fun a b -> a) n) ()
             log ~func:((fun a b -> a) n) ()
-    | _ -> printf "Invalid number" (* TODO Make it settable *)
+    | _ -> printf "Invalid number\n" (* TODO Make it settable *)
 ;;
 ;;