Browse Source

User feature

 - Add message on reset
 - Update TODO
Leo 10 years ago
parent
commit
ea97876679
2 changed files with 3 additions and 4 deletions
  1. 0 2
      TODO.md
  2. 3 2
      src/tmp_file.ml

+ 0 - 2
TODO.md

@@ -4,8 +4,6 @@
     **Feel free to add things here (and make a pull request).
     Or send an email to the author !**
 
-    + @RomFouq: Add message on reset
-
 ## Major issue
  + Remove warnings
 

+ 3 - 2
src/tmp_file.ml

@@ -119,9 +119,10 @@ let log ?(func= (+) 1 ) () =
     * else display an error message *)
 let reset cmd_num=
     match cmd_num with
-    | 0 -> Sys.remove Const.tmp_file
+    | 0 -> Sys.remove Const.tmp_file; printf "Tmp file removed\n"
     | n when n > 0 ->
             (* Set the number *)
-            log ~func:((fun a b -> a) n) ()
+            log ~func:((fun a b -> a) n) ();
+            printf "Tmp file reseted to %i\n" n
     | _ -> printf "Invalid number\n" (* TODO Make it settable *)
 ;;