X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=sendlib.c;h=d5a609391c6606a67cb5d7cb6c556118af1877e9;hp=cedcd9ea17bcc2ea893074024c0bfea05fde8dd8;hb=f422bddfe7468c3f36388a8830c832c01841eabc;hpb=df70e07e24add1869bcc9b7af2277d9d0c09a281 diff --git a/sendlib.c b/sendlib.c index cedcd9e..d5a6093 100644 --- a/sendlib.c +++ b/sendlib.c @@ -1,19 +1,10 @@ /* + * Copyright notice from original mutt: * Copyright (C) 1996-2002 Michael R. Elkins - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + * + * This file is part of mutt-ng, see http://www.muttng.org/. + * It's licensed under the GNU General Public License, + * please see the file GPL in the top level source directory. */ #define _SENDLIB_C 1 @@ -35,6 +26,10 @@ #include "mutt_crypt.h" #include "mutt_idna.h" +#include "lib/mem.h" +#include "lib/str.h" +#include "lib/intl.h" + #include #include #include @@ -1796,11 +1791,11 @@ static void mutt_gen_localpart (char *buf, unsigned int len, char *fmt) break; case 'O': snprintf (tmp, sizeof (tmp), "%lo", (unsigned long) now); - safe_strncat (buf, len, tmp, strlen (tmp)); + safe_strncat (buf, len, tmp, mutt_strlen (tmp)); break; case 'p': snprintf (tmp, sizeof (tmp), "%u", (unsigned int) getpid ()); - safe_strncat (buf, len, tmp, strlen (tmp)); + safe_strncat (buf, len, tmp, mutt_strlen (tmp)); break; case 'P': snprintf (tmp, sizeof (tmp), "%c", MsgIdPfx); @@ -1809,11 +1804,11 @@ static void mutt_gen_localpart (char *buf, unsigned int len, char *fmt) break; case 'r': snprintf (tmp, sizeof (tmp), "%u", (unsigned int) rand ()); - safe_strncat (buf, len, tmp, strlen (tmp)); + safe_strncat (buf, len, tmp, mutt_strlen (tmp)); break; case 'R': snprintf (tmp, sizeof (tmp), "%x", (unsigned int) rand ()); - safe_strncat (buf, len, tmp, strlen (tmp)); + safe_strncat (buf, len, tmp, mutt_strlen (tmp)); break; case 's': snprintf (tmp, sizeof (tmp), "%02d", tm->tm_sec); @@ -1821,11 +1816,11 @@ static void mutt_gen_localpart (char *buf, unsigned int len, char *fmt) break; case 'T': snprintf (tmp, sizeof (tmp), "%u", (unsigned int) now); - safe_strncat (buf, len, tmp, strlen (tmp)); + safe_strncat (buf, len, tmp, mutt_strlen (tmp)); break; case 'X': snprintf (tmp, sizeof (tmp), "%x", (unsigned int) now); - safe_strncat (buf, len, tmp, strlen (tmp)); + safe_strncat (buf, len, tmp, mutt_strlen (tmp)); break; case 'Y': snprintf (tmp, sizeof (tmp), "%04d", tm->tm_year + 1900); /* this will break in the year 10000 ;-) */ @@ -1862,7 +1857,7 @@ char *mutt_gen_msgid (void) if (!(fqdn = mutt_fqdn (0))) fqdn = NONULL (Hostname); - localpart_length = sizeof (buf) - strlen (fqdn) - 4; /* the 4 characters are '<', '@', '>' and '\0' */ + localpart_length = sizeof (buf) - mutt_strlen (fqdn) - 4; /* the 4 characters are '<', '@', '>' and '\0' */ mutt_gen_localpart (localpart, localpart_length, MsgIdFormat);