Commit 721894f6 authored by rswindell's avatar rswindell
Browse files

Renamed truncate() to truncstr() - conflicted with unistd.h.

parent cbcda654
......@@ -1156,7 +1156,7 @@ static BOOL chk_email_addr(SOCKET socket, char* p, char* host_name, char* host_i
while(*p && *p<=' ') p++;
if(*p=='<') p++; /* Skip '<' */
SAFECOPY(addr,p);
truncate(addr,">( ");
truncstr(addr,">( ");
if(!trashcan(&scfg,addr,"email"))
return(TRUE);
......@@ -1756,7 +1756,7 @@ static void smtp_thread(void* arg)
while(*p && *p<=' ') p++;
if(*p=='<') {
p++;
truncate(p,">");
truncstr(p,">");
SAFECOPY(rcpt_name,p);
}
smb_hfield(&msg, RFC822TO, (ushort)strlen(p), p);
......@@ -1767,7 +1767,7 @@ static void smtp_thread(void* arg)
while(*p && *p<=' ') p++;
if(*p=='<') {
p++;
truncate(p,">");
truncstr(p,">");
}
nettype=NET_INTERNET;
smb_hfield(&msg, REPLYTONETTYPE, nettype, &nettype);
......@@ -1785,7 +1785,7 @@ static void smtp_thread(void* arg)
p=buf+5;
while(*p && *p<=' ') p++;
SAFECOPY(sender_addr,p);
truncate(sender_addr,">( ");
truncstr(sender_addr,">( ");
/* Get the sender's "name" (if possible) */
p=buf+5;
......@@ -1966,7 +1966,7 @@ static void smtp_thread(void* arg)
else
p++;
truncate(str,"> ");
truncstr(str,"> ");
forward=FALSE;
no_forward=FALSE;
......@@ -2082,7 +2082,7 @@ static void smtp_thread(void* arg)
*tp=0; /* truncate at '@' */
while(*p && !isalnum(*p)) p++; /* Skip '<' or '"' */
truncate(p,"\"");
truncstr(p,"\"");
p=alias(&scfg,p,name_alias_buf);
if(p==name_alias_buf)
......@@ -2235,10 +2235,10 @@ static void smtp_thread(void* arg)
else
p++;
strcpy(sender_addr,p);
truncate(sender_addr,">");
truncstr(sender_addr,">");
/* get sender */
strcpy(sender,sender_addr);
if(truncate(sender,"@")==NULL)
if(truncstr(sender,"@")==NULL)
sender[0]=0;
sockprintf(socket, "354 send the mail data, end with <CRLF>.<CRLF>");
......@@ -2533,7 +2533,7 @@ static void sendmail_thread(void* arg)
port=atoi(p+1);
}
SAFECOPY(to,(char*)msg.to_net.addr);
truncate(to,"> ");
truncstr(to,"> ");
p=strrchr(to,'@');
if(p==NULL) {
......@@ -2642,7 +2642,7 @@ static void sendmail_thread(void* arg)
strcpy(fromaddr,msg.from_net.addr);
else
usermailaddr(&scfg,fromaddr,msg.from);
truncate(fromaddr," ");
truncstr(fromaddr," ");
if(fromaddr[0]=='<')
sockprintf(sock,"MAIL FROM: %s",fromaddr);
else
......@@ -2658,7 +2658,7 @@ static void sendmail_thread(void* arg)
else
p=(char*)msg.to_net.addr;
SAFECOPY(toaddr,p);
truncate(toaddr,"> ");
truncstr(toaddr,"> ");
sockprintf(sock,"RCPT TO: <%s>", toaddr);
if(!sockgetrsp(sock,"25", buf, sizeof(buf))) {
sprintf(err,"%s replied with '%s' instead of 25*",server,buf);
......
......@@ -770,7 +770,7 @@ extern "C" {
/* str_util.c */
DLLEXPORT void DLLCALL truncsp(char* str);
DLLEXPORT char * DLLCALL truncate(char* str, const char* set);
DLLEXPORT char * DLLCALL truncstr(char* str, const char* set);
DLLEXPORT char * DLLCALL ascii_str(uchar* str);
DLLEXPORT BOOL DLLCALL findstr(char *insearch, char *fname);
DLLEXPORT BOOL DLLCALL trashcan(scfg_t* cfg, char *insearch, char *name);
......
......@@ -244,7 +244,7 @@ void DLLCALL truncsp(char *str)
/****************************************************************************/
/* Truncate string at first occurance of char in specified character set */
/****************************************************************************/
char* DLLCALL truncate(char* str, const char* set)
char* DLLCALL truncstr(char* str, const char* set)
{
char* p;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment