case PlayCommand:
{
char
- basename[MagickPathExtent];
+ basename[MagickPathExtent],
+ name[MagickPathExtent];
int
status;
*state|=PlayAnimationState;
*state&=(~AutoReverseAnimationState);
GetPathComponent((*image)->magick_filename,BasePath,basename);
- (void) FormatLocaleString(windows->image.name,MagickPathExtent,
- "%s: %s",MagickPackageName,basename);
+ (void) FormatLocaleString(name,MagickPathExtent,"%s: %s",
+ MagickPackageName,basename);
+ (void) CloneString(&windows->image.name,name);
if (resource_info->title != (char *) NULL)
{
char
title=InterpretImageProperties(resource_info->image_info,*image,
resource_info->title,exception);
- (void) CopyMagickString(windows->image.name,title,MagickPathExtent);
+ (void) CloneString(&windows->image.name,title);
title=DestroyString(title);
}
status=XStringListToTextProperty(&windows->image.name,1,&window_name);
title=InterpretImageProperties(resource_info->image_info,display_image,
resource_info->title,exception);
- (void) CopyMagickString(windows->image.name,title,MagickPathExtent);
- (void) CopyMagickString(windows->image.icon_name,title,MagickPathExtent);
+ (void) CloneString(&windows->image.name,title);
+ (void) CloneString(&windows->image.icon_name,title);
title=DestroyString(title);
}
else
{
char
- filename[MagickPathExtent];
+ filename[MagickPathExtent],
+ window_name[MagickPathExtent];
/*
Window name is the base of the filename.
*/
GetPathComponent(display_image->magick_filename,TailPath,filename);
- (void) FormatLocaleString(windows->image.name,MagickPathExtent,
+ (void) FormatLocaleString(window_name,MagickPathExtent,
"%s: %s[scene: %.20g frames: %.20g]",MagickPackageName,filename,(double)
display_image->scene,(double) number_scenes);
- (void) CopyMagickString(windows->image.icon_name,filename,MagickPathExtent);
+ (void) CloneString(&windows->image.name,window_name);
+ (void) CloneString(&windows->image.icon_name,filename);
}
if (resource_info->immutable != MagickFalse)
windows->image.immutable=MagickTrue;
title=InterpretImageProperties(resource_info->image_info,
image_list[scene],resource_info->title,exception);
- (void) CopyMagickString(windows->image.name,title,MagickPathExtent);
+ (void) CloneString(&windows->image.name,title);
title=DestroyString(title);
}
else
{
+ char
+ window_name[MaxTextExtent];
+
p=image_list[scene]->magick_filename+
strlen(image_list[scene]->magick_filename)-1;
while ((p > image_list[scene]->magick_filename) && (*(p-1) != '/'))
p--;
- (void) FormatLocaleString(windows->image.name,MagickPathExtent,
+ (void) FormatLocaleString(window_name,MagickPathExtent,
"%s: %s[%.20g of %.20g]",MagickPackageName,p,(double) scene+1,
(double) number_scenes);
+ (void) CloneString(&windows->image.name,window_name);
}
status=XStringListToTextProperty(&windows->image.name,1,&window_name);
if (status != Success)
if ((state & StepAnimationState) ||
(resource_info->title != (char *) NULL))
{
+ char
+ name[MaxTextExtent];
+
/*
Update window title.
*/
strlen(image_list[scene]->filename)-1;
while ((p > image_list[scene]->filename) && (*(p-1) != '/'))
p--;
- (void) FormatLocaleString(windows->image.name,MagickPathExtent,
+ (void) FormatLocaleString(name,MagickPathExtent,
"%s: %s[%.20g of %.20g]",MagickPackageName,p,(double)
scene+1,(double) number_scenes);
+ (void) CloneString(&windows->image.name,name);
if (resource_info->title != (char *) NULL)
{
char
title=InterpretImageProperties(resource_info->image_info,
image,resource_info->title,exception);
- (void) CopyMagickString(windows->image.name,title,
- MagickPathExtent);
+ (void) CloneString(&windows->image.name,title);
title=DestroyString(title);
}
status=XStringListToTextProperty(&windows->image.name,1,
title=InterpretImageProperties(resource_info->image_info,display_image,
resource_info->title,exception);
- (void) CopyMagickString(windows->image.name,title,MagickPathExtent);
- (void) CopyMagickString(windows->image.icon_name,title,MagickPathExtent);
+ (void) CloneString(&windows->image.name,title);
+ (void) CloneString(&windows->image.icon_name,title);
title=DestroyString(title);
}
else
{
char
- filename[MagickPathExtent];
+ filename[MagickPathExtent],
+ window_name[MagickPathExtent];
/*
Window name is the base of the filename.
*/
GetPathComponent(display_image->magick_filename,TailPath,filename);
if (display_image->scene == 0)
- (void) FormatLocaleString(windows->image.name,MagickPathExtent,
- "%s: %s",MagickPackageName,filename);
+ (void) FormatLocaleString(window_name,MagickPathExtent,"%s: %s",
+ MagickPackageName,filename);
else
- (void) FormatLocaleString(windows->image.name,MagickPathExtent,
+ (void) FormatLocaleString(window_name,MagickPathExtent,
"%s: %s[scene: %.20g frames: %.20g]",MagickPackageName,filename,
(double) display_image->scene,(double) GetImageListLength(
display_image));
- (void) CopyMagickString(windows->image.icon_name,filename,
- MagickPathExtent);
+ (void) CloneString(&windows->image.name,window_name);
+ (void) CloneString(&windows->image.icon_name,filename);
}
if (resource_info->immutable)
windows->image.immutable=MagickTrue;