[Pkg-ocaml-maint-commits] r2893 - in
/trunk/packages/mldonkey/trunk/debian/utils: common_options.ml
lexer_options.mll mldonkey_options.ml mldonkey_server.ml
smimram at users.alioth.debian.org
smimram at users.alioth.debian.org
Mon Jul 10 07:45:46 UTC 2006
Author: smimram
Date: Mon Jul 10 07:45:42 2006
New Revision: 2893
URL: http://svn.debian.org/wsvn/pkg-ocaml-maint/?sc=1&rev=2893
Log:
Minor update of the utils.
Modified:
trunk/packages/mldonkey/trunk/debian/utils/common_options.ml
trunk/packages/mldonkey/trunk/debian/utils/lexer_options.mll
trunk/packages/mldonkey/trunk/debian/utils/mldonkey_options.ml
trunk/packages/mldonkey/trunk/debian/utils/mldonkey_server.ml
Modified: trunk/packages/mldonkey/trunk/debian/utils/common_options.ml
URL: http://svn.debian.org/wsvn/pkg-ocaml-maint/trunk/packages/mldonkey/trunk/debian/utils/common_options.ml?rev=2893&op=diff
==============================================================================
--- trunk/packages/mldonkey/trunk/debian/utils/common_options.ml (original)
+++ trunk/packages/mldonkey/trunk/debian/utils/common_options.ml Mon Jul 10 07:45:42 2006
@@ -125,8 +125,8 @@
in
Printf.fprintf stderr
( "Unable to parse file: %s\n"
- ^^"Last word seen : %S\n"
- ^^"Position : line %d, char. %d-%d\n" )
+ ^^"Last word seen: %S\n"
+ ^^"Position: line %d, char. %d-%d\n" )
(start_position.pos_fname)
(Lexing.lexeme lexbuf)
(start_position.pos_lnum)
@@ -141,11 +141,11 @@
try
Parse_options.main Lexer_options.token lexbuf
with Parsing.Parse_error ->
- print_string "Unable to parse option to set";
+ print_string "Unable to parse option to set.";
print_newline ();
- print_string ("Last word seen : " ^ (Lexing.lexeme lexbuf));
+ print_string ("Last word seen: " ^ (Lexing.lexeme lexbuf));
print_newline ();
- print_string ("Position : "^(string_of_int (Lexing.lexeme_start lexbuf))^
+ print_string ("Position: "^(string_of_int (Lexing.lexeme_start lexbuf))^
"-" ^ (string_of_int (Lexing.lexeme_end lexbuf)));
print_newline ();
raise Parsing.Parse_error
Modified: trunk/packages/mldonkey/trunk/debian/utils/lexer_options.mll
URL: http://svn.debian.org/wsvn/pkg-ocaml-maint/trunk/packages/mldonkey/trunk/debian/utils/lexer_options.mll?rev=2893&op=diff
==============================================================================
--- trunk/packages/mldonkey/trunk/debian/utils/lexer_options.mll (original)
+++ trunk/packages/mldonkey/trunk/debian/utils/lexer_options.mll Mon Jul 10 07:45:42 2006
@@ -29,7 +29,7 @@
| '.' { SEP_LIST }
| '"' (([^'"'] | '\\' '"')* as s) '"' {
String.iter (fun c -> if c = '\n' then incrline lexbuf) s;
- STRING (Str.global_replace (Str.regexp "\\\\\"") "\"" s) }
+ STRING s }
| ['A'-'Z' 'a'-'z'] ['A'-'Z' 'a'-'z' '0'-'9' '_'] * { IDENT(Lexing.lexeme lexbuf) }
| eof { EOF }
Modified: trunk/packages/mldonkey/trunk/debian/utils/mldonkey_options.ml
URL: http://svn.debian.org/wsvn/pkg-ocaml-maint/trunk/packages/mldonkey/trunk/debian/utils/mldonkey_options.ml?rev=2893&op=diff
==============================================================================
--- trunk/packages/mldonkey/trunk/debian/utils/mldonkey_options.ml (original)
+++ trunk/packages/mldonkey/trunk/debian/utils/mldonkey_options.ml Mon Jul 10 07:45:42 2006
@@ -18,10 +18,10 @@
("-u", Arg.String(fun x -> action := Some (User x)), "Edit user password")*)
]
(fun x -> password := x )
- "Usage : mldonkey_options [options] \n where options are :"
+ "Usage : mldonkey_options [options]\n where options are:"
in
begin
- match !filename,!action with
+ match !filename, !action with
| None, _ ->
print_string "You must provide the name of the file to open -f";
print_newline ();
@@ -31,7 +31,8 @@
try
let v = find_option o (load_option f)
in
- print_simple_value v
+ print_simple_value v;
+ print_newline ()
with Not_found ->
prerr_string ("Unable to find option "^o);
prerr_newline ();
@@ -79,13 +80,12 @@
in
let rec set_one_option set_fl fl =
match set_fl with
- Comment(_,f) ->
+ | Comment(_, f) ->
set_one_option f fl
- | Options(o,f) ->
+ | Options(o, f) ->
set_one_option f (replace_option o fl)
| Eof ->
fl
in
save_option f (set_one_option new_options options)
end
-;;
Modified: trunk/packages/mldonkey/trunk/debian/utils/mldonkey_server.ml
URL: http://svn.debian.org/wsvn/pkg-ocaml-maint/trunk/packages/mldonkey/trunk/debian/utils/mldonkey_server.ml?rev=2893&op=diff
==============================================================================
--- trunk/packages/mldonkey/trunk/debian/utils/mldonkey_server.ml (original)
+++ trunk/packages/mldonkey/trunk/debian/utils/mldonkey_server.ml Mon Jul 10 07:45:42 2006
@@ -267,12 +267,12 @@
(
"--stop",
Arg.Unit (fun x -> state := {!state with action = Stop}),
- "Stop a running mldonkey_server ( use the pidfile )"
+ "Stop a running mldonkey_server (use the pidfile)"
);
(
"--restart",
Arg.Unit (fun x -> state := {!state with action = Restart}),
- "Restart a running mldonkey_server ( use the pifile, only respawn mlnet )"
+ "Restart a running mldonkey_server (use the pifile, only respawn mlnet)"
);
(
"--",
@@ -281,7 +281,7 @@
)
]
add_args
- "Usage mldonkey_server [options] -- [mlnet options] where options are :"
+ "Usage mldonkey_server [options] -- [mlnet options] where options are:"
in
!state
;;
More information about the Pkg-ocaml-maint-commits
mailing list