X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=generator%2Fgenerator_docstrings.ml;h=406bd55ef9679887a639152127670d7a4b618675;hb=fa13b2838fd32854a4b2c6a5fff47e17a72294fb;hp=44f92c05c7f136734928343ad6fd30cbb043358a;hpb=04d8209077d2227eb1d42695ba71147f78987050;p=libguestfs.git diff --git a/generator/generator_docstrings.ml b/generator/generator_docstrings.ml index 44f92c0..406bd55 100644 --- a/generator/generator_docstrings.ml +++ b/generator/generator_docstrings.ml @@ -30,7 +30,7 @@ let progress_message = "This long-running command can generate progress notification messages so that the caller can display a progress bar or indicator. To receive these messages, the caller must register a progress -callback. See L." +event callback. See L." let protocol_limit_warning = "Because of the message protocol, there is a transfer limit @@ -40,17 +40,17 @@ let danger_will_robinson = "B." -let deprecation_notice flags = +let deprecation_notice ?(prefix = "") flags = try let alt = find_map (function DeprecatedBy str -> Some str | _ -> None) flags in let txt = - sprintf "This function is deprecated. -In new code, use the C<%s> call instead. + sprintf "I +In new code, use the L call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems -with correct use of these functions." alt in +with correct use of these functions." prefix alt in Some txt with Not_found -> None @@ -62,6 +62,7 @@ let copyright_years = (* Generate a header block in a number of standard styles. *) type comment_style = CStyle | CPlusPlusStyle | HashStyle | OCamlStyle | HaskellStyle + | ErlangStyle type license = GPLv2plus | LGPLv2plus let generate_header ?(extra_inputs = []) comment license = @@ -71,7 +72,8 @@ let generate_header ?(extra_inputs = []) comment license = | CPlusPlusStyle -> pr "// "; "//" | HashStyle -> pr "# "; "#" | OCamlStyle -> pr "(* "; " *" - | HaskellStyle -> pr "{- "; " " in + | HaskellStyle -> pr "{- "; " " + | ErlangStyle -> pr "%% "; "% " in pr "libguestfs generated file\n"; pr "%s WARNING: THIS FILE IS GENERATED FROM:\n" c; List.iter (pr "%s %s\n" c) inputs; @@ -113,6 +115,7 @@ let generate_header ?(extra_inputs = []) comment license = (match comment with | CStyle -> pr " */\n" | CPlusPlusStyle + | ErlangStyle | HashStyle -> () | OCamlStyle -> pr " *)\n" | HaskellStyle -> pr "-}\n"