MagickExport const char *GetLocaleMessage(const char *tag)
{
char
- name[MagickPathExtent];
+ name[MagickLocaleExtent];
const LocaleInfo
*locale_info;
if ((tag == (const char *) NULL) || (*tag == '\0'))
return(tag);
exception=AcquireExceptionInfo();
- (void) FormatLocaleString(name,MagickPathExtent,"%s/",tag);
+ (void) FormatLocaleString(name,MagickLocaleExtent,"%s/",tag);
locale_info=GetLocaleInfo_(name,exception);
exception=DestroyExceptionInfo(exception);
if (locale_info != (const LocaleInfo *) NULL)
element=(const char *) GetNextValueInLinkedList(paths);
while (element != (const char *) NULL)
{
- (void) FormatLocaleString(path,MagickPathExtent,"%s%s",element,filename);
+ (void) FormatLocaleString(path,MagickPathExtent,"%s%s",element,
+ filename);
(void) LogMagickEvent(LocaleEvent,GetMagickModule(),
"Searching for locale file: \"%s\"",path);
xml=ConfigureFileToStringInfo(path);
ExceptionInfo *exception)
{
char
- keyword[MagickPathExtent],
- message[MagickPathExtent],
- tag[MagickPathExtent],
+ keyword[MagickLocaleExtent],
+ message[MagickLocaleExtent],
+ tag[MagickLocaleExtent],
*token;
const char
GetMagickToken(q,&q,token);
if (*token == '\0')
break;
- (void) CopyMagickString(keyword,token,MagickPathExtent);
+ (void) CopyMagickString(keyword,token,MagickLocaleExtent);
if (LocaleNCompare(keyword,"<!DOCTYPE",9) == 0)
{
/*
*/
while (((*token != '/') && (*(token+1) != '>')) && (*q != '\0'))
{
- (void) CopyMagickString(keyword,token,MagickPathExtent);
+ (void) CopyMagickString(keyword,token,MagickLocaleExtent);
GetMagickToken(q,&q,token);
if (*token != '=')
continue;
*/
while ((*token != '>') && (*q != '\0'))
{
- (void) CopyMagickString(keyword,token,MagickPathExtent);
+ (void) CopyMagickString(keyword,token,MagickLocaleExtent);
GetMagickToken(q,&q,token);
if (*token != '=')
continue;
if (LocaleCompare(keyword,"</locale>") == 0)
{
ChopLocaleComponents(tag,1);
- (void) ConcatenateMagickString(tag,"/",MagickPathExtent);
+ (void) ConcatenateMagickString(tag,"/",MagickLocaleExtent);
continue;
}
if (LocaleCompare(keyword,"<localemap>") == 0)
*/
while ((*token != '>') && (*q != '\0'))
{
- (void) CopyMagickString(keyword,token,MagickPathExtent);
+ (void) CopyMagickString(keyword,token,MagickLocaleExtent);
GetMagickToken(q,&q,token);
if (*token != '=')
continue;
GetMagickToken(q,&q,token);
if (LocaleCompare(keyword,"name") == 0)
{
- (void) ConcatenateMagickString(tag,token,MagickPathExtent);
- (void) ConcatenateMagickString(tag,"/",MagickPathExtent);
+ (void) ConcatenateMagickString(tag,token,MagickLocaleExtent);
+ (void) ConcatenateMagickString(tag,"/",MagickLocaleExtent);
}
}
for (p=(char *) q; (*q != '<') && (*q != '\0'); q++) ;
while ((isspace((int) ((unsigned char) *q)) != 0) && (q > p))
q--;
(void) CopyMagickString(message,p,MagickMin((size_t) (q-p+2),
- MagickPathExtent));
+ MagickLocaleExtent));
locale_info=(LocaleInfo *) AcquireMagickMemory(sizeof(*locale_info));
if (locale_info == (LocaleInfo *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
(void) ThrowMagickException(exception,GetMagickModule(),
ResourceLimitError,"MemoryAllocationFailed","`%s'",
locale_info->tag);
- (void) ConcatenateMagickString(tag,message,MagickPathExtent);
- (void) ConcatenateMagickString(tag,"\n",MagickPathExtent);
+ (void) ConcatenateMagickString(tag,message,MagickLocaleExtent);
+ (void) ConcatenateMagickString(tag,"\n",MagickLocaleExtent);
q++;
continue;
}
if (LocaleCompare(keyword,"</message>") == 0)
{
ChopLocaleComponents(tag,2);
- (void) ConcatenateMagickString(tag,"/",MagickPathExtent);
+ (void) ConcatenateMagickString(tag,"/",MagickLocaleExtent);
continue;
}
if (*keyword == '<')
{
ChopLocaleComponents(tag,1);
if (*tag != '\0')
- (void) ConcatenateMagickString(tag,"/",MagickPathExtent);
+ (void) ConcatenateMagickString(tag,"/",MagickLocaleExtent);
continue;
}
token[strlen(token)-1]='\0';
- (void) CopyMagickString(token,token+1,MagickPathExtent);
- (void) ConcatenateMagickString(tag,token,MagickPathExtent);
- (void) ConcatenateMagickString(tag,"/",MagickPathExtent);
+ (void) CopyMagickString(token,token+1,MagickLocaleExtent);
+ (void) ConcatenateMagickString(tag,token,MagickLocaleExtent);
+ (void) ConcatenateMagickString(tag,"/",MagickLocaleExtent);
continue;
}
GetMagickToken(q,(const char **) NULL,token);