[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#758915: cwcp 3.3.1 does not read CWCP_OPTIONS environment variable



On 22.08.2014 23:01, Kamil Ignacak wrote:

    * What was the outcome of this action?
    * What outcome did you expect instead?

    "-t" option should set tone (frequency) of sound in cwcp to 200 Hz,
    but cwcp was using its default 800 Hz. cwcp does not read the value
    of the environment variable.

Here is a patch that fixes this problem in unixcw 3.3.1.

cw_process_argv() should use "combined_argc" and "combined_argv" variables that contain argc/argv values combined with options from CWCP_OPTIONS.

Best regards,
Kamil Ignacak
upstream developer

diff --git a/src/cwcp/cwcp.c b/src/cwcp/cwcp.c
index 52fb9e7..131552d 100644
--- a/src/cwcp/cwcp.c
+++ b/src/cwcp/cwcp.c
@@ -1557,7 +1557,7 @@ int main(int argc, char **argv)
 	config->has_practice_time = true;
 	config->has_outfile = true;
 
-	if (!cw_process_argv(argc, argv, all_options, config)) {
+	if (!cw_process_argv(combined_argc, combined_argv, all_options, config)) {
 		fprintf(stderr, _("%s: failed to parse command line args\n"), config->program_name);
 		return EXIT_FAILURE;
 	}

Reply to: