prev_alias=NULL;
for (alias=AliasData->First ; alias ; alias=alias->Next) {
if (alias->Type==ALIASTYPE_Name && !strcmp(Name,alias->Name.Mask)) {
- debuga(_("Duplicate aliasing directive for name %s\n"),Name);
+ debuga(__FILE__,__LINE__,_("Duplicate aliasing directive for name %s\n"),Name);
return(0);
}
prev_alias=alias;
// insert into the list
new_alias=malloc(sizeof(*new_alias));
if (!new_alias) {
- debuga(_("Not enough memory to store the user name aliasing directives\n"));
+ debuga(__FILE__,__LINE__,_("Not enough memory to store the user name aliasing directives\n"));
return(-1);
}
new_alias->Type=ALIASTYPE_Name;
new_alias->Name.Wildcards=wildcards;
new_alias->Name.Mask=StringBuffer_Store(AliasData->StringBuffer,Name);
if (!new_alias->Name.Mask) {
- debuga(_("Not enough memory to store the user name aliasing directives\n"));
+ debuga(__FILE__,__LINE__,_("Not enough memory to store the user name aliasing directives\n"));
free(new_alias);
return(-1);
}
len=(int)(ReplaceE-Replace);
new_alias->Alias=StringBuffer_StoreLength(AliasData->StringBuffer,Replace,len);
if (!new_alias->Alias) {
- debuga(_("Not enough memory to store the user name aliasing directives\n"));
+ debuga(__FILE__,__LINE__,_("Not enough memory to store the user name aliasing directives\n"));
free(new_alias);
return(-1);
}
int bit=alias->Ipv4.NBits%8;
if ((byte<1 || memcmp(ipv4,alias->Ipv4.Ip,byte)==0) && (bit==0 || (ipv4[byte] ^ alias->Ipv4.Ip[byte]) & (0xFFU<<(8-bit)))==0) {
if (nbits==alias->Ipv4.NBits)
- debuga(_("Duplicate aliasing directive for IPv4 address %d.%d.%d.%d/%d\n"),
+ debuga(__FILE__,__LINE__,_("Duplicate aliasing directive for IPv4 address %d.%d.%d.%d/%d\n"),
ipv4[0],ipv4[1],ipv4[2],ipv4[3],nbits);
else
- debuga(_("IPv4 aliasing directive ignored for IPv4 address %d.%d.%d.%d/%d as it is"
+ debuga(__FILE__,__LINE__,_("IPv4 aliasing directive ignored for IPv4 address %d.%d.%d.%d/%d as it is"
" narrower than a previous one (%d.%d.%d.%d/%d\n"),
ipv4[0],ipv4[1],ipv4[2],ipv4[3],nbits,
alias->Ipv4.Ip[0],alias->Ipv4.Ip[1],alias->Ipv4.Ip[2],alias->Ipv4.Ip[3],
// insert into the list
new_alias=malloc(sizeof(*new_alias));
if (!new_alias) {
- debuga(_("Not enough memory to store the host name aliasing directives\n"));
+ debuga(__FILE__,__LINE__,_("Not enough memory to store the host name aliasing directives\n"));
return(-1);
}
new_alias->Type=ALIASTYPE_Ipv4;
len=(int)(ReplaceE-Replace);
tmp=malloc(len+2);
if (!tmp) {
- debuga(_("Not enough memory to store the host name aliasing directives\n"));
+ debuga(__FILE__,__LINE__,_("Not enough memory to store the host name aliasing directives\n"));
free(new_alias);
return(-1);
}
new_alias->Alias=StringBuffer_Store(AliasData->StringBuffer,tmp);
}
if (!new_alias->Alias) {
- debuga(_("Not enough memory to store the IPv4 aliasing directives\n"));
+ debuga(__FILE__,__LINE__,_("Not enough memory to store the IPv4 aliasing directives\n"));
free(new_alias);
return(-1);
}
int bit=alias->Ipv6.NBits%16;
if ((word<1 || memcmp(ipv6,alias->Ipv6.Ip,word*2)==0) && (bit==0 || (ipv6[word] ^ alias->Ipv6.Ip[word]) & (0xFFFFU<<(16-bit)))==0) {
if (nbits==alias->Ipv6.NBits)
- debuga(_("Duplicate aliasing directive for IPv6 address %x:%x:%x:%x:%x:%x:%x:%x/%d\n"),
+ debuga(__FILE__,__LINE__,_("Duplicate aliasing directive for IPv6 address %x:%x:%x:%x:%x:%x:%x:%x/%d\n"),
ipv6[0],ipv6[1],ipv6[2],ipv6[3],ipv6[4],ipv6[5],ipv6[6],ipv6[7],nbits);
else
- debuga(_("IPv6 aliasing directive ignored for IPv6 address %x:%x:%x:%x:%x:%x:%x:%x/%d as it is"
+ debuga(__FILE__,__LINE__,_("IPv6 aliasing directive ignored for IPv6 address %x:%x:%x:%x:%x:%x:%x:%x/%d as it is"
" narrower than a previous one (%x:%x:%x:%x:%x:%x:%x:%x/%d\n"),
ipv6[0],ipv6[1],ipv6[2],ipv6[3],ipv6[4],ipv6[5],ipv6[6],ipv6[7],nbits,
alias->Ipv6.Ip[0],alias->Ipv6.Ip[1],alias->Ipv6.Ip[2],alias->Ipv6.Ip[3],alias->Ipv6.Ip[4],
// insert into the list
new_alias=malloc(sizeof(*new_alias));
if (!new_alias) {
- debuga(_("Not enough memory to store the host name aliasing directives\n"));
+ debuga(__FILE__,__LINE__,_("Not enough memory to store the host name aliasing directives\n"));
return(-1);
}
new_alias->Type=ALIASTYPE_Ipv6;
len=ReplaceE-Replace;
tmp=malloc(len+2);
if (!tmp) {
- debuga(_("Not enough memory to store the host name aliasing directives\n"));
+ debuga(__FILE__,__LINE__,_("Not enough memory to store the host name aliasing directives\n"));
free(new_alias);
return(-1);
}
new_alias->Alias=StringBuffer_Store(AliasData->StringBuffer,tmp);
}
if (!new_alias->Alias) {
- debuga(_("Not enough memory to store the IPv6 aliasing directives\n"));
+ debuga(__FILE__,__LINE__,_("Not enough memory to store the IPv6 aliasing directives\n"));
free(new_alias);
return(-1);
}
for (End=buf ; *End && *End!=Delimiter ; End++) {
if (*End=='\\') {
if (End[1]=='\0') {
- debuga(_("Invalid NUL character found in regular expression\n"));
+ debuga(__FILE__,__LINE__,_("Invalid NUL character found in regular expression\n"));
return(-1);
}
End++; //ignore the escaped character
}
}
if (*End!=Delimiter) {
- debuga(_("Unterminated regular expression\n"));
+ debuga(__FILE__,__LINE__,_("Unterminated regular expression\n"));
return(-1);
}
*End++='\0';
// store it
new_alias=malloc(sizeof(*new_alias));
if (!new_alias) {
- debuga(_("Not enough memory to store the host name aliasing directives\n"));
+ debuga(__FILE__,__LINE__,_("Not enough memory to store the host name aliasing directives\n"));
return(-1);
}
new_alias->Type=ALIASTYPE_Pcre;
new_alias->Next=NULL;
new_alias->Regex.Re=pcre_compile(buf,0,&PcreError,&ErrorOffset,NULL);
if (new_alias->Regex.Re==NULL) {
- debuga(_("Failed to compile the regular expression \"%s\": %s\n"),buf,PcreError);
+ debuga(__FILE__,__LINE__,_("Failed to compile the regular expression \"%s\": %s\n"),buf,PcreError);
free(new_alias);
return(-1);
}
len=strlen(Replace);
tmp=malloc(len+2);
if (!tmp) {
- debuga(_("Not enough memory to store the host name aliasing directives\n"));
+ debuga(__FILE__,__LINE__,_("Not enough memory to store the host name aliasing directives\n"));
pcre_free(new_alias->Regex.Re);
return(-1);
}
new_alias->Alias=StringBuffer_Store(AliasData->StringBuffer,tmp);
free(tmp);
if (!new_alias->Alias) {
- debuga(_("Not enough memory to store the regex aliasing directives\n"));
+ debuga(__FILE__,__LINE__,_("Not enough memory to store the regex aliasing directives\n"));
free(new_alias);
return(-1);
}
if (Alias_StoreRegexp(AliasData,String+3)<0)
return(-1);
#else
- debuga(_("PCRE not compiled in therefore the regular expressions are not available to alias items\n"));
+ debuga(__FILE__,__LINE__,_("PCRE not compiled in therefore the regular expressions are not available to alias items\n"));
return(-1);
#endif
}
switch (alias->Type)
{
case ALIASTYPE_Name:
- debuga(_(" %s => %s\n"),alias->Name.Mask,alias->Alias);
+ debuga(__FILE__,__LINE__,_(" %s => %s\n"),alias->Name.Mask,alias->Alias);
break;
case ALIASTYPE_Ipv4:
- debuga(_(" %d.%d.%d.%d/%d => %s\n"),alias->Ipv4.Ip[0],alias->Ipv4.Ip[1],alias->Ipv4.Ip[2],
+ debuga(__FILE__,__LINE__,_(" %d.%d.%d.%d/%d => %s\n"),alias->Ipv4.Ip[0],alias->Ipv4.Ip[1],alias->Ipv4.Ip[2],
alias->Ipv4.Ip[3],alias->Ipv4.NBits,alias->Alias);
break;
case ALIASTYPE_Ipv6:
- debuga(_(" %x:%x:%x:%x:%x:%x:%x:%x/%d => %s\n"),alias->Ipv6.Ip[0],alias->Ipv6.Ip[1],alias->Ipv6.Ip[2],
+ debuga(__FILE__,__LINE__,_(" %x:%x:%x:%x:%x:%x:%x:%x/%d => %s\n"),alias->Ipv6.Ip[0],alias->Ipv6.Ip[1],alias->Ipv6.Ip[2],
alias->Ipv6.Ip[3],alias->Ipv6.Ip[4],alias->Ipv6.Ip[5],alias->Ipv6.Ip[6],alias->Ipv6.Ip[7],
alias->Ipv6.NBits,alias->Alias);
break;
case ALIASTYPE_Pcre:
- debuga(_(" Re => %s\n"),alias->Alias);
+ debuga(__FILE__,__LINE__,_(" Re => %s\n"),alias->Alias);
break;
}
}