From 3162339402ccbf0b3fc97829b242bfdce1645006 Mon Sep 17 00:00:00 2001 From: Steve Revill Date: Thu, 21 Oct 2010 11:32:03 +0000 Subject: [PATCH] Fix for reading the CLI command line on RO 4.02 and 6.20. Author: Willi Theiss Version 0.20. Tagged as 'builder-0_20' --- VersionNum | 20 ++++++++++---------- c/main | 11 ++++++----- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/VersionNum b/VersionNum index f423075..bc1a6d4 100644 --- a/VersionNum +++ b/VersionNum @@ -1,23 +1,23 @@ -/* (0.19) +/* (0.20) * * This file is automatically maintained by srccommit, do not edit manually. * Last processed by srccommit version: 1.1. * */ -#define Module_MajorVersion_CMHG 0.19 +#define Module_MajorVersion_CMHG 0.20 #define Module_MinorVersion_CMHG -#define Module_Date_CMHG 07 Jun 2009 +#define Module_Date_CMHG 21 Oct 2010 -#define Module_MajorVersion "0.19" -#define Module_Version 19 +#define Module_MajorVersion "0.20" +#define Module_Version 20 #define Module_MinorVersion "" -#define Module_Date "07 Jun 2009" +#define Module_Date "21 Oct 2010" -#define Module_ApplicationDate "07-Jun-09" +#define Module_ApplicationDate "21-Oct-10" #define Module_ComponentName "builder" #define Module_ComponentPath "castle/RiscOS/Utilities/Release/builder" -#define Module_FullVersion "0.19" -#define Module_HelpVersion "0.19 (07 Jun 2009)" -#define Module_LibraryVersionInfo "0:19" +#define Module_FullVersion "0.20" +#define Module_HelpVersion "0.20 (21 Oct 2010)" +#define Module_LibraryVersionInfo "0:20" diff --git a/c/main b/c/main index 7caf2a1..3ebe0fc 100644 --- a/c/main +++ b/c/main @@ -786,6 +786,12 @@ int main(void) debug_set_area_level_prefix(FALSE); debug_set_device(DEBUGIT_OUTPUT); + /* read CLI commandline (before it is reused by toolbox initialisation RO 4.42,6.xx) */ + _kernel_swi(OS_GetEnv,®,®); + if (strstr((char*)reg.r[0],"-quit")) { + quiting = TRUE; + } + read_builds(); read_defaults(); @@ -842,11 +848,6 @@ int main(void) toolbox_get_sys_info(3,®); /* Obtain wimp task handle */ task_handle = reg.r[0]; - _kernel_swi(OS_GetEnv,®,®); - if (strstr((char*)reg.r[0],"-quit")) { - quiting = TRUE; - } - ERR_GOTO(err,env_source()); if (!quiting) { -- GitLab