}
if (iterations == 1)
{
- status=command(image_info,argc,argv,metadata,exception);
+ char
+ *text;
+
+ text=(char *) NULL;
+ status=command(image_info,argc,argv,&text,exception);
if (exception->severity != UndefinedException)
{
if ((exception->severity > ErrorException) ||
status=MagickFalse;
CatchException(exception);
}
- if ((metadata != (char **) NULL) && (*metadata != (char *) NULL))
+ if (text != (char *) NULL)
{
- (void) fputs(*metadata,stdout);
- *metadata=DestroyString(*metadata);
+ if (metadata != (char **) NULL)
+ (void) ConcatenateString(&(*metadata),text);
+ text=DestroyString(text);
}
return(status);
}
{
for (i=0; i < (ssize_t) iterations; i++)
{
+ char
+ *text;
+
+ text=(char *) NULL;
if (status == MagickFalse)
continue;
if (duration > 0)
continue;
(void) ContinueTimer(timer);
}
- status=command(image_info,argc,argv,metadata,exception);
+ status=command(image_info,argc,argv,&text,exception);
if (exception->severity != UndefinedException)
{
if ((exception->severity > ErrorException) ||
status=MagickFalse;
CatchException(exception);
}
- if ((metadata != (char **) NULL) && (*metadata != (char *) NULL))
+ if (text != (char *) NULL)
{
- (void) fputs(*metadata,stdout);
- *metadata=DestroyString(*metadata);
+ if (metadata != (char **) NULL)
+ (void) ConcatenateString(&(*metadata),text);
+ text=DestroyString(text);
}
- }
+ }
}
else
{
#endif
for (i=0; i < (ssize_t) iterations; i++)
{
+ char
+ *text;
+
+ text=(char *) NULL;
if (status == MagickFalse)
continue;
if (duration > 0)
continue;
(void) ContinueTimer(timer);
}
- status=command(image_info,argc,argv,metadata,exception);
+ status=command(image_info,argc,argv,&text,exception);
#if defined(MAGICKCORE_OPENMP_SUPPORT)
# pragma omp critical (MagickCore_MagickCommandGenesis)
#endif
status=MagickFalse;
CatchException(exception);
}
- if ((metadata != (char **) NULL) && (*metadata != (char *) NULL))
+ if (text != (char *) NULL)
{
- (void) fputs(*metadata,stdout);
- *metadata=DestroyString(*metadata);
+ if (metadata != (char **) NULL)
+ (void) ConcatenateString(&(*metadata),text);
+ text=DestroyString(text);
}
}
}
};
char
- client_name[MagickPathExtent];
+ client_name[MagickPathExtent],
+ *metadata;
ExceptionInfo
*exception;
}
i%=(sizeof(MagickCommands)/sizeof(MagickCommands[0]));
}
+ metadata=(char *) NULL;
status=MagickCommandGenesis(image_info,MagickCommands[i].command,argc,argv,
- (char **) NULL,exception);
+ &metadata,exception);
+ if (metadata != (char *) NULL)
+ {
+ (void) fputs(metadata,stdout);
+ metadata=DestroyString(metadata);
+ }
image_info=DestroyImageInfo(image_info);
exception=DestroyExceptionInfo(exception);
MagickCoreTerminus();