/[mldonkey]/mldonkey/src/daemon/common/commonOptions.ml
ViewVC logotype

Diff of /mldonkey/src/daemon/common/commonOptions.ml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.57 by spiralvoice, Sat May 28 10:20:33 2005 UTC revision 1.58 by spiralvoice, Mon May 30 21:02:56 2005 UTC
# Line 1097  let password = define_option current_sec Line 1097  let password = define_option current_sec
1097    
1098  *********************)  *********************)
1099    
1100  let filename_conversions = define_expert_option current_section  let safe_utf8 s =
1101      ["filename_conversions"]    if Charset.is_utf8 s
1102      "The conversions to apply on characters depending on their ASCII code"    then s
1103      (list_option (tuple2_option (int_option, string_option)))    else failwith (Printf.sprintf "%s is not an UTF-8 string.\n" s)
1104    [    
1105      (228, "ae");  let value_to_utf8 v =
1106      (246, "oe");    let s = Options.value_to_string v in
1107      (252, "ue");    safe_utf8 s
1108      (223, "ss");  
1109      (196, "Ae");  let utf8_to_value s =
1110      (214, "Oe");    let s = safe_utf8 s in
1111      (220, "Ue");    Options.string_to_value s
1112    ]          
1113    let utf8_option =
1114        define_option_class "Utf8"
1115        value_to_utf8 utf8_to_value
1116    
1117    let utf8_filename_conversions = define_expert_option current_section
1118        ["utf8_filename_conversions"]
1119        "The conversions to apply on Unicode characters"
1120        (list_option (tuple2_option (int_option, utf8_option))) []
1121    
1122  let client_timeout = define_expert_option current_section ["client_timeout"]  let client_timeout = define_expert_option current_section ["client_timeout"]
1123    "Timeout on client connections when not queued" float_option 40.    "Timeout on client connections when not queued" float_option 40.
1124    

Legend:
Removed from v.1.57  
changed lines
  Added in v.1.58

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26