docs: Fix function names in deprecation notices.
authorRichard W.M. Jones <rjones@redhat.com>
Sat, 6 Aug 2011 14:57:21 +0000 (15:57 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Sat, 6 Aug 2011 14:57:21 +0000 (15:57 +0100)
generator/generator_c.ml
generator/generator_docstrings.ml

index fa9c0ff..c9bfb1f 100644 (file)
@@ -255,7 +255,7 @@ I<The caller must free the returned buffer after use>.\n\n"
           pr "This function takes a key or passphrase parameter which
 could contain sensitive material.  Read the section
 L</KEYS AND PASSPHRASES> for more information.\n\n";
           pr "This function takes a key or passphrase parameter which
 could contain sensitive material.  Read the section
 L</KEYS AND PASSPHRASES> for more information.\n\n";
-        (match deprecation_notice flags with
+        (match deprecation_notice ~prefix:"guestfs_" flags with
          | None -> ()
          | Some txt -> pr "%s\n\n" txt
         );
          | None -> ()
          | Some txt -> pr "%s\n\n" txt
         );
index de31aa5..6d242bd 100644 (file)
@@ -40,17 +40,17 @@ let danger_will_robinson =
   "B<This command is dangerous.  Without careful use you
 can easily destroy all your data>."
 
   "B<This command is dangerous.  Without careful use you
 can easily destroy all your data>."
 
-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.
   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.
+In new code, use the L</%s%s> call instead.
 
 Deprecated functions will not be removed from the API, but the
 fact that they are deprecated indicates that there are problems
 
 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
     Some txt
   with
     Not_found -> None