30 |
open CommonTypes |
open CommonTypes |
31 |
open CommonFile |
open CommonFile |
32 |
|
|
33 |
|
(* prints a new logline with date, module and starts newline *) |
34 |
|
let lprintf_nl () = |
35 |
|
lprintf "%s[cCO] " |
36 |
|
(log_time ()); lprintf_nl2 |
37 |
|
|
38 |
|
(* prints a new logline with date, module and does not start newline *) |
39 |
|
let lprintf_n () = |
40 |
|
lprintf "%s[cCO] " |
41 |
|
(log_time ()); lprintf |
42 |
|
|
43 |
(*************************************************************************) |
(*************************************************************************) |
44 |
(* *) |
(* *) |
92 |
set_file_state file file_state; |
set_file_state file file_state; |
93 |
if !verbose then |
if !verbose then |
94 |
(match file_state with |
(match file_state with |
95 |
FileDownloading -> lprintf_nl "New downloading file"; |
FileDownloading -> lprintf_nl () "New downloading file"; |
96 |
| FileDownloaded -> lprintf_nl "New downloaded file"; |
| FileDownloaded -> lprintf_nl () "New downloaded file"; |
97 |
| _ -> lprintf_nl "New file with other state" |
| _ -> lprintf_nl () "New file with other state" |
98 |
); |
); |
99 |
|
|
100 |
(try |
(try |
257 |
in |
in |
258 |
let network = |
let network = |
259 |
try network_find_by_name network with e -> |
try network_find_by_name network with e -> |
260 |
lprintf_nl "Network %s not supported" network; |
lprintf_nl () "Network %s not supported" network; |
261 |
raise e |
raise e |
262 |
in |
in |
263 |
let server = network_server_of_option network assocs in |
let server = network_server_of_option network assocs in |
930 |
Options.save_with_help results_ini; |
Options.save_with_help results_ini; |
931 |
results =:= []; |
results =:= []; |
932 |
end; |
end; |
933 |
lprintf_nl "Options correctly saved" |
lprintf_nl () "Options correctly saved" |
934 |
|
|
935 |
let save_sources () = |
let save_sources () = |
936 |
networks_iter (fun n -> network_save_sources n); |
networks_iter (fun n -> network_save_sources n); |
937 |
lprintf_nl "Sources correctly saved" |
lprintf_nl () "Sources correctly saved" |