GraphicsMagick: Eliminate duplicate utility name output in error...

GraphicsMagick Commits <[email protected]> Sun, 17 Sep 2023 13:40:37 -0500
Newsgroups gmane.comp.video.graphicsmagick.cvs
Message-ID <mailman.1312.1694976045.1462.graphicsmagick-commit@lists.sourceforge.net>
changeset 39266dbb994f in /hg/GraphicsMagick
details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=39266dbb994f
summary: Eliminate duplicate utility name output in error messages when utility is executed via a magick compatibility link

diffstat:

 ChangeLog          |   7 +++++++
 magick/command.c   |  11 +++--------
 www/Changelog.html |   6 ++++++
 3 files changed, 16 insertions(+), 8 deletions(-)

diffs (61 lines):

diff -r 9289a384e55a -r 39266dbb994f ChangeLog
--- a/ChangeLog	Sun Sep 17 11:47:28 2023 -0500
+++ b/ChangeLog	Sun Sep 17 13:40:33 2023 -0500
@@ -1,5 +1,12 @@
 2023-09-17  Bob Friesenhahn  <[email protected]>
 
+	* magick/command.c (MagickCommand): Eliminate duplicate utility
+	name output in error messages when utility is executed via a
+	magick compatibility link.  For example via symbolic link from
+	'convert' to 'gm'.  This problem was added when the initial batch
+	mode implementation was submitted.  Addresses SourceForge issue
+	#727 "convert convert" in error messages.
+
 	* VisualMagick/configure/welcome_page.cpp: Update configure
 	welcome text based on my current understanding.
 
diff -r 9289a384e55a -r 39266dbb994f magick/command.c
--- a/magick/command.c	Sun Sep 17 11:47:28 2023 -0500
+++ b/magick/command.c	Sun Sep 17 13:40:33 2023 -0500
@@ -8990,12 +8990,9 @@
           char
             command_name[MaxTextExtent];
 
-          const char
-            *pos;
-
           /*
-            Append subcommand name to existing client name if end of
-            existing client name is not identical to subcommand name.
+            Append subcommand name to existing client name if existing
+            client name is not identical to subcommand name.
           */
           LockSemaphoreInfo(command_semaphore);
           if (run_mode == BatchMode)
@@ -9003,9 +9000,7 @@
           else
             {
               GetPathComponent(GetClientName(),BasePath,command_name);
-              pos=strrchr(command_name,' ');
-              if ((pos == (const char *) NULL) ||
-                  (LocaleCompare(commands[i].command,pos+1) != 0))
+              if (LocaleCompare(commands[i].command,command_name) != 0)
                 {
                   char
                     client_name[MaxTextExtent];
diff -r 9289a384e55a -r 39266dbb994f www/Changelog.html
--- a/www/Changelog.html	Sun Sep 17 11:47:28 2023 -0500
+++ b/www/Changelog.html	Sun Sep 17 13:40:33 2023 -0500
@@ -40,6 +40,12 @@
 <p>2023-09-17  Bob Friesenhahn  &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
 <blockquote>
 <ul class="simple">
+<li><p>magick/command.c (MagickCommand): Eliminate duplicate utility
+name output in error messages when utility is executed via a
+magick compatibility link.  For example via symbolic link from
+'convert' to 'gm'.  This problem was added when the initial batch
+mode implementation was submitted.  Addresses SourceForge issue
+#727 &quot;convert convert&quot; in error messages.</p></li>
 <li><p>VisualMagick/configure/welcome_page.cpp: Update configure
 welcome text based on my current understanding.</p></li>
 </ul>