X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;ds=sidebyside;f=generator%2Fgenerator_fish.ml;h=6d6a571208e94d766be1b43bb7cd050600acd5fe;hb=e2249b7ce1dd0a2f8f110e0e47aca397185a6373;hp=c5def5c9bf44406b9bf12c34eb8a2ad82bbc87bb;hpb=319e946b92e175c05cdd1fdcb85c9b86f5631011;p=libguestfs.git diff --git a/generator/generator_fish.ml b/generator/generator_fish.ml index c5def5c..6d6a571 100644 --- a/generator/generator_fish.ml +++ b/generator/generator_fish.ml @@ -56,11 +56,13 @@ let generate_fish_cmds () = pr "#include \n"; pr "#include \n"; pr "\n"; - pr "#include \n"; pr "#include \"c-ctype.h\"\n"; pr "#include \"full-write.h\"\n"; pr "#include \"xstrtol.h\"\n"; + pr "\n"; + pr "#include \n"; pr "#include \"fish.h\"\n"; + pr "#include \"fish-cmds.h\"\n"; pr "#include \"options.h\"\n"; pr "#include \"cmds_gperf.h\"\n"; pr "\n"; @@ -134,16 +136,6 @@ Guestfish will prompt for these separately." ("\n\n" ^ protocol_limit_warning) else "" in - (* For DangerWillRobinson commands, we should probably have - * guestfish prompt before allowing you to use them (especially - * in interactive mode). XXX - *) - let warnings = - warnings ^ - if List.mem DangerWillRobinson flags then - ("\n\n" ^ danger_will_robinson) - else "" in - let warnings = warnings ^ match deprecation_notice flags with @@ -621,6 +613,22 @@ Guestfish will prompt for these separately." pr " }\n"; pr "}\n" +and generate_fish_cmds_h () = + generate_header CStyle GPLv2plus; + + pr "#ifndef FISH_CMDS_H\n"; + pr "#define FISH_CMDS_H\n"; + pr "\n"; + + List.iter ( + fun (shortname, _, _, _, _, _, _) -> + pr "extern int run_%s (const char *cmd, size_t argc, char *argv[]);\n" + shortname + ) fish_commands; + + pr "\n"; + pr "#endif /* FISH_CMDS_H */\n" + (* gperf code to do fast lookups of commands. *) and generate_fish_cmds_gperf () = generate_header CStyle GPLv2plus; @@ -847,9 +855,6 @@ Guestfish will prompt for these separately.\n\n"; if List.mem ProtocolLimitWarning flags then pr "%s\n\n" protocol_limit_warning; - if List.mem DangerWillRobinson flags then - pr "%s\n\n" danger_will_robinson; - match deprecation_notice flags with | None -> () | Some txt -> pr "%s\n\n" txt