diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2010-11-26 21:51:11 +0000 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2010-11-26 21:51:11 +0000 |
commit | 272b754093ef824486993540a893d39be8e7e9f0 (patch) | |
tree | cccad46c8446246663050bf7e7b28936d1f8a392 /fish | |
parent | b4c853f7d493af1d71f352832fed29eb7e377e8f (diff) | |
download | libguestfs-272b754093ef824486993540a893d39be8e7e9f0.tar.gz libguestfs-272b754093ef824486993540a893d39be8e7e9f0.tar.xz libguestfs-272b754093ef824486993540a893d39be8e7e9f0.zip |
fish: Don't use external pod2text program.
This removes the dependency from guestfish to the external
pod2text program (and hence the final dependency on perl for
guestfish). This is done by storing the formatted pod2text
output in guestfish as the help text.
Diffstat (limited to 'fish')
-rw-r--r-- | fish/cmds_gperf.h | 6 | ||||
-rw-r--r-- | fish/fish.c | 18 | ||||
-rw-r--r-- | fish/fish.h | 1 |
3 files changed, 2 insertions, 23 deletions
diff --git a/fish/cmds_gperf.h b/fish/cmds_gperf.h index 92bd6070..74db69d2 100644 --- a/fish/cmds_gperf.h +++ b/fish/cmds_gperf.h @@ -23,10 +23,8 @@ * guestfish can execute. */ struct command_entry { - /* These fields are passed to pod2text to implement the online help. */ - const char *name; - const char *shortdesc; - const char *podbody; + const char *name; /* Short name. */ + const char *help; /* Online help. */ /* The run_* function. */ int (*run) (const char *cmd, size_t argc, char *argv[]); diff --git a/fish/fish.c b/fish/fish.c index c1dbfb4d..50340a35 100644 --- a/fish/fish.c +++ b/fish/fish.c @@ -531,24 +531,6 @@ set_up_terminal (void) have_terminfo = 1; } -void -pod2text (const char *name, const char *shortdesc, const char *str) -{ - FILE *fp; - - fp = popen ("pod2text", "w"); - if (fp == NULL) { - /* pod2text failed, maybe not found, so let's just print the - * source instead, since that's better than doing nothing. - */ - printf ("%s - %s\n\n%s\n", name, shortdesc, str); - return; - } - fprintf (fp, "=head1 NAME\n\n%s - %s\n\n", name, shortdesc); - fputs (str, fp); - pclose (fp); -} - static void prepare_drives (struct drv *drv) { diff --git a/fish/fish.h b/fish/fish.h index 35978052..f4b6c9cb 100644 --- a/fish/fish.h +++ b/fish/fish.h @@ -64,7 +64,6 @@ extern int progress_bars; extern int remote_control_csh; extern const char *libvirt_uri; extern int issue_command (const char *cmd, char *argv[], const char *pipe); -extern void pod2text (const char *name, const char *shortdesc, const char *body); extern void list_builtin_commands (void); extern int display_builtin_command (const char *cmd); extern void free_strings (char **argv); |