From: Richard W.M. Jones Date: Wed, 3 Nov 2010 22:11:22 +0000 (+0000) Subject: docs: Indent *_va and *_argv functions correctly. X-Git-Tag: 1.7.2~11 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=19ea54b3f488755731ffc079519d6011dade9e5c;p=libguestfs.git docs: Indent *_va and *_argv functions correctly. This fixes commit f661db2c393d1b7e4211c55682b7fac82a70e36d. --- diff --git a/generator/generator_c.ml b/generator/generator_c.ml index ca14d14..13040f0 100644 --- a/generator/generator_c.ml +++ b/generator/generator_c.ml @@ -84,9 +84,11 @@ let rec generate_prototype ?(extern = true) ?(static = false) let next () = if !comma then ( if single_line then pr ", " - else - pr ",\n%s%s" - indent (spaces (String.length prefix + String.length name + 2)) + else ( + let namelen = String.length prefix + String.length name + + String.length suffix + 2 in + pr ",\n%s%s" indent (spaces namelen) + ) ); comma := true in @@ -256,16 +258,14 @@ L for more information.\n\n"; (* Handling of optional argument variants. *) if optargs <> [] then ( pr "=head2 %s_va\n\n" name; - pr " "; - generate_prototype ~extern:false ~handle:"g" + generate_prototype ~extern:false ~indent:" " ~handle:"g" ~prefix:"guestfs_" ~suffix:"_va" ~optarg_proto:VA shortname style; pr "\n\n"; pr "This is the \"va_list variant\" of L.\n\n" name; pr "See L.\n\n"; pr "=head2 %s_argv\n\n" name; - pr " "; - generate_prototype ~extern:false ~handle:"g" + generate_prototype ~extern:false ~indent:" " ~handle:"g" ~prefix:"guestfs_" ~suffix:"_argv" ~optarg_proto:Argv shortname style; pr "\n\n";