[pacman-dev,v2,1/2] pacman/pacman-conf: removed hputs macro for usage display

Message ID 20190910093353.157317-1-wsdmatty@gmail.com
State Accepted, archived
Headers show
Series
  • [pacman-dev,v2,1/2] pacman/pacman-conf: removed hputs macro for usage display
Related show

Commit Message

Matthew Sexton Sept. 10, 2019, 9:33 a.m. UTC
Signed-off-by: Matthew Sexton <wsdmatty@gmail.com>
---
 src/pacman/pacman-conf.c | 24 +++++++++++-------------
 1 file changed, 11 insertions(+), 13 deletions(-)

Comments

Allan McRae Sept. 10, 2019, 11:32 a.m. UTC | #1
On 10/9/19 7:33 pm, Matthew Sexton wrote:
> Signed-off-by: Matthew Sexton <wsdmatty@gmail.com>
> ---

What changed in v2 apart from the disappearing commit message?

>  src/pacman/pacman-conf.c | 24 +++++++++++-------------
>  1 file changed, 11 insertions(+), 13 deletions(-)
> 
> diff --git a/src/pacman/pacman-conf.c b/src/pacman/pacman-conf.c
> index df874029..d9e596b8 100644
> --- a/src/pacman/pacman-conf.c
> +++ b/src/pacman/pacman-conf.c
> @@ -37,19 +37,17 @@ static void cleanup(void)
>  static void usage(int ret)
>  {
>  	FILE *stream = (ret ? stderr : stdout);
> -#define hputs(x) fputs(x"\n", stream)
> -	hputs("pacman-conf - query pacman's configuration file");
> -	hputs("usage:  pacman-conf [options] [<directive>...]");
> -	hputs("        pacman-conf (--repo-list|--help|--version)");
> -	hputs("options:");
> -	hputs("  -c, --config=<path>  set an alternate configuration file");
> -	hputs("  -R, --rootdir=<path> set an alternate installation root");
> -	hputs("  -r, --repo=<remote>  query options for a specific repo");
> -	hputs("  -v, --verbose        always show directive names");
> -	hputs("  -l, --repo-list      list configured repositories");
> -	hputs("  -h, --help           display this help information");
> -	hputs("  -V, --version        display version information");
> -#undef hputs
> +	fputs("pacman-conf - query pacman's configuration file\n", stream);
> +	fputs("usage:  pacman-conf [options] [<directive>...]\n", stream);
> +	fputs("        pacman-conf (--repo-list|--help|--version)\n", stream);
> +	fputs("options:\n", stream);
> +	fputs("  -c, --config=<path>  set an alternate configuration file\n", stream);
> +	fputs("  -R, --rootdir=<path> set an alternate installation root\n", stream);
> +	fputs("  -r, --repo=<remote>  query options for a specific repo\n", stream);
> +	fputs("  -v, --verbose        always show directive names\n", stream);
> +	fputs("  -l, --repo-list      list configured repositories\n", stream);
> +	fputs("  -h, --help           display this help information\n", stream);
> +	fputs("  -V, --version        display version information\n", stream);
>  	cleanup();
>  	exit(ret);
>  }
>
Matthew Sexton Sept. 10, 2019, 11:39 a.m. UTC | #2
On Tuesday, September 10, 2019 7:32:46 AM EDT you wrote:
> On 10/9/19 7:33 pm, Matthew Sexton wrote:
> > Signed-off-by: Matthew Sexton <wsdmatty@gmail.com>
> > ---
> 
> What changed in v2 apart from the disappearing commit message?
> 
Nothing. My apologies. I wasn't thinking and just re-sent both patches when I 
changed the second one. 

PATCH v2 1/2 can be ignored, it's identical to the original.

Patch

diff --git a/src/pacman/pacman-conf.c b/src/pacman/pacman-conf.c
index df874029..d9e596b8 100644
--- a/src/pacman/pacman-conf.c
+++ b/src/pacman/pacman-conf.c
@@ -37,19 +37,17 @@  static void cleanup(void)
 static void usage(int ret)
 {
 	FILE *stream = (ret ? stderr : stdout);
-#define hputs(x) fputs(x"\n", stream)
-	hputs("pacman-conf - query pacman's configuration file");
-	hputs("usage:  pacman-conf [options] [<directive>...]");
-	hputs("        pacman-conf (--repo-list|--help|--version)");
-	hputs("options:");
-	hputs("  -c, --config=<path>  set an alternate configuration file");
-	hputs("  -R, --rootdir=<path> set an alternate installation root");
-	hputs("  -r, --repo=<remote>  query options for a specific repo");
-	hputs("  -v, --verbose        always show directive names");
-	hputs("  -l, --repo-list      list configured repositories");
-	hputs("  -h, --help           display this help information");
-	hputs("  -V, --version        display version information");
-#undef hputs
+	fputs("pacman-conf - query pacman's configuration file\n", stream);
+	fputs("usage:  pacman-conf [options] [<directive>...]\n", stream);
+	fputs("        pacman-conf (--repo-list|--help|--version)\n", stream);
+	fputs("options:\n", stream);
+	fputs("  -c, --config=<path>  set an alternate configuration file\n", stream);
+	fputs("  -R, --rootdir=<path> set an alternate installation root\n", stream);
+	fputs("  -r, --repo=<remote>  query options for a specific repo\n", stream);
+	fputs("  -v, --verbose        always show directive names\n", stream);
+	fputs("  -l, --repo-list      list configured repositories\n", stream);
+	fputs("  -h, --help           display this help information\n", stream);
+	fputs("  -V, --version        display version information\n", stream);
 	cleanup();
 	exit(ret);
 }