From 355399d3ef1f32fe7f6bc5d47fe862111dd6fadf Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Thu, 8 Jul 2021 16:03:05 -0400 Subject: [PATCH] Modified the startup behavior so that if a ".tcl" script file is presented on the command line, then all following arguments are assumed to be arguments of the script and not additional input to be processed by magic. This allows arguments to be passed to scripts passed to magic on the command line. --- VERSION | 2 +- utils/main.c | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 7e549f91..0a172f3d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.184 +8.3.185 diff --git a/utils/main.c b/utils/main.c index 06e06c7d..e60aa77e 100644 --- a/utils/main.c +++ b/utils/main.c @@ -413,7 +413,16 @@ mainDoArgs(argc, argv) #endif #ifdef MAGIC_WRAPPER if (!strcasecmp(c, ".tcl")) + { CurrentName->fn_type = FN_TCL_SCRIPT; + /* Behavior: If a .tcl file is passed on the + * command line, then all following arguments + * are assumed to be arguments of the script, + * and not to be processed as additional + * input file types. + */ + break; + } #endif } }