sox-devel@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
From: "Måns Rullgård" <mans@mansr.com>
To: Seth Troisi <braintwo@gmail.com>
Cc: sox-devel@lists.sourceforge.net
Subject: Re: [Patch] Change to exit(0) for --help-format
Date: Mon, 16 Dec 2019 11:51:54 +0000	[thread overview]
Message-ID: <yw1xr214wkrp.fsf@mansr.com> (raw)
In-Reply-To: <CAEvcHoBh3aH==o9k5ChZOor1D5a1CQXOaC5tU962yeoLKVKuOw@mail.gmail.com> (Seth Troisi's message of "Thu, 12 Dec 2019 17:21:58 -0800")

Seth Troisi <braintwo@gmail.com> writes:

> exit(0) if --help-format <fmt> is found (or all).
> continue to exit(1) if fmt is not found.
>
> This is my first patch, let me know what I can do to make this happen.

Could you explain why you want to make this change?  What problem does
it solve?

> From 61fafa760a32f9ec1b096ff92ed4f39c1f9d95e7 Mon Sep 17 00:00:00 2001
> From: Seth Troisi <sethtroisi@google.com>
> Date: Thu, 12 Dec 2019 17:16:44 -0800
> Subject: [PATCH] Change exit to 0 for --help-format <fmt> if fmt is found
>
> ---
>  src/sox.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/sox.c b/src/sox.c
> index 15f0df67..b5a827fc 100644
> --- a/src/sox.c
> +++ b/src/sox.c
> @@ -2133,6 +2133,7 @@ static void usage_format(char const * name)
>      if (!(f = sox_find_format(name, sox_false))) {
>        printf("Cannot find a format called `%s'.\n", name);
>        display_supported_formats();
> +      exit(1);
>      }
>      else usage_format1(f);
>    }
> @@ -2143,7 +2144,7 @@ static void usage_format(char const * name)
>          usage_format1(f);
>      }
>    }
> -  exit(1);
> +  exit(0);
>  }
>  
>  static void read_comment_file(sox_comments_t * comments, char const * const filename)
> -- 
> 2.24.1.735.g03f4e72817-goog
>
>
> _______________________________________________
> SoX-devel mailing list
> SoX-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sox-devel
>

-- 
Måns Rullgård


_______________________________________________
SoX-devel mailing list
SoX-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-devel

  reply	other threads:[~2019-12-16 11:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-13  1:21 [Patch] Change to exit(0) for --help-format Seth Troisi
2019-12-16 11:51 ` Måns Rullgård [this message]
2019-12-16 18:13   ` Seth Troisi
2019-12-17 12:01     ` Måns Rullgård
2019-12-17 18:43       ` Seth Troisi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.sourceforge.net/lists/listinfo/sox-devel

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yw1xr214wkrp.fsf@mansr.com \
    --to=sox-devel@lists.sourceforge.net \
    --cc=braintwo@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/sox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).