search for: try_tilde_expansion

Displaying 10 results from an estimated 10 matches for "try_tilde_expansion".

2009 Aug 21
9
enable -Werror and all of gcc's warning options
Here is a bunch of small patches to make fish/ build with most warnings enabled: [1/9] edit.c: avoid warning about signed/unsigned comparison [2/9] fish.c: avoid warnings [3/9] tilde.c: avoid a warning [4/9] fish.c: avoid "assignment discards qualifiers..." warning [5/9] fish.c: avoid signed/unsigned-comparison warning [6/9] fish.c: don't perform arithmetic on void*
2015 Aug 27
0
[PATCH v4 2/2] fish: add journal-view command
...ml | 3 +++ 4 files changed, 32 insertions(+), 2 deletions(-) diff --git a/fish/fish.h b/fish/fish.h index df22e34..8ae6454 100644 --- a/fish/fish.h +++ b/fish/fish.h @@ -104,6 +104,9 @@ extern int rc_remote (int pid, const char *cmd, size_t argc, char *argv[], /* in tilde.c */ extern char *try_tilde_expansion (char *path); +/* in journal.c */ +extern int journal_view (const char *fields); + /* This should just list all the built-in commands so they can * be added to the generated auto-completion code. */ diff --git a/generator/Makefile.am b/generator/Makefile.am index a3fe50d..bd466c2 100644 ---...
2015 Mar 05
0
[PATCH v3] fish: add journal-view command
...help.c \ hexedit.c \ + journal.c \ lcd.c \ man.c \ more.c \ diff --git a/fish/fish.h b/fish/fish.h index df22e34..8ae6454 100644 --- a/fish/fish.h +++ b/fish/fish.h @@ -104,6 +104,9 @@ extern int rc_remote (int pid, const char *cmd, size_t argc, char *argv[], /* in tilde.c */ extern char *try_tilde_expansion (char *path); +/* in journal.c */ +extern int journal_view (const char *fields); + /* This should just list all the built-in commands so they can * be added to the generated auto-completion code. */ diff --git a/fish/journal.c b/fish/journal.c new file mode 100644 index 0000000..8472445 ---...
2015 Mar 03
2
[PATCH v2] RFE: journal reader in guestfish
This implements new guestfish only command called journal-view. There seems to be a minor issue when user wants to run it through pager (more) and wants cancel it. User will end up with stuck guestfish until journal-view transfers all journal items. Output is now configurable, it's the same format as virt-log has, since both uses same code now. Maros Zatko (1): fish: add journal-view
2015 Mar 05
2
[PATCH v3] RFE: journal reader in guestfish
There seems to be a minor issue when user wants to run it through pager (more) and wants cancel it. User will end up with stuck guestfish until journal-view transfers all journal items. Output is now configurable, it's the same format as virt-log has, since both uses same code now. Maros Zatko (1): fish: add journal-view command cat/Makefile.am | 1 + cat/log.c | 113
2015 Aug 27
4
[PATCH v4 0/2] RFE: journal reader in guestfish
There seems to be a minor issue when user wants to run it through pager (more) and wants cancel it. User will end up with stuck guestfish until journal-view transfers all journal items. Output is configurable, it's the same format as virt-log has, since both uses same code. Maros Zatko (2): cat: move get_journal_field to fish/journal.c fish: add journal-view command cat/Makefile.am
2015 Mar 03
0
[PATCH v2] fish: add journal-view command
...help.c \ hexedit.c \ + journal.c \ lcd.c \ man.c \ more.c \ diff --git a/fish/fish.h b/fish/fish.h index df22e34..8ae6454 100644 --- a/fish/fish.h +++ b/fish/fish.h @@ -104,6 +104,9 @@ extern int rc_remote (int pid, const char *cmd, size_t argc, char *argv[], /* in tilde.c */ extern char *try_tilde_expansion (char *path); +/* in journal.c */ +extern int journal_view (const char *fields); + /* This should just list all the built-in commands so they can * be added to the generated auto-completion code. */ diff --git a/fish/journal.c b/fish/journal.c new file mode 100644 index 0000000..8472445 ---...
2009 Nov 20
1
fix new failures from latest-from-gnulib syntax-check
...(EXIT_FAILURE); } } @@ -302,7 +302,7 @@ rc_listen (void) } unlink (sockpath); - exit (0); + exit (EXIT_SUCCESS); } /* Remote control client. */ diff --git a/fish/tilde.c b/fish/tilde.c index 64b5b39..c599e16 100644 --- a/fish/tilde.c +++ b/fish/tilde.c @@ -62,7 +62,7 @@ try_tilde_expansion (char *str) str = malloc (len); if (str == NULL) { perror ("malloc"); - exit (1); + exit (EXIT_FAILURE); } strcpy (str, home); strcat (str, rest); @@ -89,7 +89,7 @@ expand_home (const char *append) str = malloc (len); if (str...
2009 Aug 03
1
[PATCH 1/2] Convert all TABs-as-indentation to spaces.
...sing string at '%s'\n"), - p); - abort (); + fprintf (stderr, _("guestfish: internal error parsing string at '%s'\n"), + p); + abort (); } if (!tilde_candidate) - argv[i] = p; + argv[i] = p; else - argv[i] = try_tilde_expansion (p); + argv[i] = try_tilde_expansion (p); i++; p = pend; if (*p) - p += strspn (p, " \t"); + p += strspn (p, " \t"); } if (i == sizeof argv / sizeof argv[0]) { @@ -759,8 +759,8 @@ issue_command (const char *cmd, char *argv[], const...
2016 Apr 04
2
[PATCH 1/2] Use 'error' function consistently throughout.
.../fish/tilde.c b/fish/tilde.c index 058145c..0d7dfa2 100644 --- a/fish/tilde.c +++ b/fish/tilde.c @@ -25,6 +25,8 @@ #include <assert.h> #include <pwd.h> #include <sys/types.h> +#include <errno.h> +#include <error.h> #include "fish.h" @@ -59,10 +61,8 @@ try_tilde_expansion (char *str) if (home) { len = strlen (home) + strlen (rest) + 1; str = malloc (len); - if (str == NULL) { - perror ("malloc"); - exit (EXIT_FAILURE); - } + if (str == NULL) + error (EXIT_FAILURE, errno, "malloc"); str...