# HG changeset patch # User Matti Hamalainen # Date 1646042603 -7200 # Node ID b205c60aa657f07fb79d805b56c88cc62ecf96c0 # Parent d75431bf1a7d7ec200bc85c6766c06ada5a8a295 More error handling/help stuff. diff -r d75431bf1a7d -r b205c60aa657 tools/fanalyze.c --- a/tools/fanalyze.c Mon Feb 28 11:59:26 2022 +0200 +++ b/tools/fanalyze.c Mon Feb 28 12:03:23 2022 +0200 @@ -674,11 +674,13 @@ // Parse arguments if (!dmArgsProcess(argc, argv, optList, optListN, argHandleOpt, argHandleNonOpt, OPTH_BAILOUT)) - exit(1); + goto out; if (nsrcFiles < 1) { argShowHelp(); + res = dmError(DMERR_INVALID_ARGS, + "No input file(s) specified.\n"); goto out; } diff -r d75431bf1a7d -r b205c60aa657 tools/mod2wav.c --- a/tools/mod2wav.c Mon Feb 28 11:59:26 2022 +0200 +++ b/tools/mod2wav.c Mon Feb 28 12:03:23 2022 +0200 @@ -243,6 +243,7 @@ // Check arguments if (optInFilename == NULL || optOutFilename == NULL) { + argShowHelp(); res = dmError(DMERR_INVALID_ARGS, "Input or output file not specified.\n"); goto out;