(void) FormatMagickSize(length,MagickFalse,format);
(void) FormatMagickString(message,MaxTextExtent,
- "extend %s (%s[%d], disk, %s)",cache_info->filename,
+ "extend %s (%s[%d], disk, %sB)",cache_info->filename,
cache_info->cache_filename,cache_info->file,format);
(void) LogMagickEvent(CacheEvent,GetMagickModule(),"%s",message);
}
(void) FormatMagickSize(cache_info->length,MagickTrue,
format);
(void) FormatMagickString(message,MaxTextExtent,
- "open %s (%s memory, %lux%lu %s)",cache_info->filename,
+ "open %s (%s memory, %lux%lu %sB)",cache_info->filename,
cache_info->mapped != MagickFalse ? "anonymous" : "heap",
cache_info->columns,cache_info->rows,format);
(void) LogMagickEvent(CacheEvent,GetMagickModule(),"%s",
(void) FormatMagickSize(cache_info->length,MagickTrue,
format);
(void) FormatMagickString(message,MaxTextExtent,
- "open %s (%s[%d], memory-mapped, %lux%lu %s)",
+ "open %s (%s[%d], memory-mapped, %lux%lu %sB)",
cache_info->filename,cache_info->cache_filename,
cache_info->file,cache_info->columns,cache_info->rows,
format);
{
(void) FormatMagickSize(cache_info->length,MagickFalse,format);
(void) FormatMagickString(message,MaxTextExtent,
- "open %s (%s[%d], disk, %lux%lu %s)",cache_info->filename,
+ "open %s (%s[%d], disk, %lux%lu %sB)",cache_info->filename,
cache_info->cache_filename,cache_info->file,cache_info->columns,
cache_info->rows,format);
(void) LogMagickEvent(CacheEvent,GetMagickModule(),"%s",message);
if (GetBlobSize(image) != 0)
{
(void) FormatMagickSize(GetBlobSize(image),MagickFalse,format);
- (void) fprintf(file,"%s ",format);
+ (void) fprintf(file,"%sB ",format);
}
(void) fprintf(file,"%0.3fu %ld:%02ld.%03ld",user_time,(long)
(elapsed_time/60.0),(long) floor(fmod(elapsed_time,60.0)),
(void) fprintf(file," Tainted: %s\n",MagickOptionToMnemonic(
MagickBooleanOptions,(long) image->taint));
(void) FormatMagickSize(GetBlobSize(image),MagickFalse,format);
- (void) fprintf(file," Filesize: %s\n",format);
+ (void) fprintf(file," Filesize: %sB\n",format);
(void) FormatMagickSize((MagickSizeType) image->columns*image->rows,
MagickFalse,format);
(void) fprintf(file," Number pixels: %s\n",format);
(void) fprintf(file,"%9lu ",log_info[i]->generations);
(void) FormatMagickSize(MegabytesToBytes(log_info[i]->limit),MagickFalse,
limit);
- (void) fprintf(file,"%8s ",limit);
+ (void) fprintf(file,"%8sB ",limit);
if (log_info[i]->format != (char *) NULL)
(void) fprintf(file,"%s",log_info[i]->format);
(void) fprintf(file,"\n");
format[MaxTextExtent];
(void) FormatMagickSize(GetBlobSize(image),MagickFalse,format);
- (void) FormatMagickString(value,MaxTextExtent,"%s",format);
+ (void) FormatMagickString(value,MaxTextExtent,"%sB",format);
break;
}
if (LocaleNCompare("scenes",property,6) == 0)
if (image->extent != (MagickSizeType) ((size_t) image->extent))
(void) FormatMagickSize(image->extent,MagickFalse,format);
q+=ConcatenateMagickString(q,format,extent);
+ q+=ConcatenateMagickString(q,"B",extent);
break;
}
case 'c':
(void) FormatMagickString(value,MaxTextExtent,"%ld",(long)
attributes.st_mtime);
(void) FormatMagickSize(GetBlobSize(image),MagickFalse,value);
+ (void) ConcatenateMagickString(value,"B",MaxTextExtent);
(void) SetImageProperty(thumbnail_image,"Thumb::Size",value);
(void) FormatMagickString(value,MaxTextExtent,"image/%s",image->magick);
LocaleLower(value);
break;
}
UnlockSemaphoreInfo(resource_semaphore);
- (void) LogMagickEvent(ResourceEvent,GetMagickModule(),"%s: %s/%s/%s",
+ (void) LogMagickEvent(ResourceEvent,GetMagickModule(),"%s: %sB/%sB/%sB",
MagickOptionToMnemonic(MagickResourceOptions,(long) type),resource_request,
resource_current,resource_limit);
return(status);
break;
}
UnlockSemaphoreInfo(resource_semaphore);
- (void) LogMagickEvent(ResourceEvent,GetMagickModule(),"%s: %s/%s/%s",
+ (void) LogMagickEvent(ResourceEvent,GetMagickModule(),"%s: %sB/%sB/%sB",
MagickOptionToMnemonic(MagickResourceOptions,(long) type),resource_request,
resource_current,resource_limit);
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% FormatMagickSize() converts a size to a human readable format, for example,
-% 14kb, 234mb, 2.7gb, or 3.0tb. Scaling is done by repetitively dividing by
+% 14k, 234m, 2.7g, or 3.0t. Scaling is done by repetitively dividing by
% 1000.
%
% The format of the FormatMagickSize method is:
static const char
*bi_units[] =
{
- "b", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB", (char *) NULL
+ "", "Ki", "Mi", "Gi", "Ti", "Pi", "Ei", "Zi", "Yi", (char *) NULL
},
*traditional_units[] =
{
- "b", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB", (char *) NULL
+ "", "K", "M", "G", "T", "P", "E", "Z", "Y", (char *) NULL
};
bytes=1000.0;