X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=nntp%2Fnewsrc.c;h=6f3d867c9776947d474e2c946fcf85b8106ac2af;hp=ff9df9e0e1c9048998dcab9018a0038526ed85a4;hb=cfc49a0d8c3ac2c0bd4b217026d0740c55f2e5db;hpb=c6b9d35ed9361e4defab9762a7480d5126405ae9 diff --git a/nntp/newsrc.c b/nntp/newsrc.c index ff9df9e..6f3d867 100644 --- a/nntp/newsrc.c +++ b/nntp/newsrc.c @@ -18,13 +18,13 @@ #include #include +#include + #include "mutt.h" #include "mutt_curses.h" #include "sort.h" #include "mx.h" -#include "mime.h" #include "nntp.h" -#include "rfc822.h" #include "rfc1524.h" #include "rfc2047.h" @@ -74,7 +74,7 @@ static int nntp_parse_newsrc_line (NNTP_SERVER * news, char *line) len = p + 1 - line; if (len > sizeof (group)) len = sizeof (group); - strfcpy (group, line, len); + m_strcpy(group, len, line); if ((data = (NNTP_DATA *) hash_find (news->newsgroups, group)) == NULL) { data = xmalloc(sizeof(NNTP_DATA) + m_strlen(group) + 1); data->group = (char *) data + sizeof (NNTP_DATA); @@ -184,7 +184,7 @@ static int nntp_parse_cacheindex (NNTP_SERVER * news) if (!NewsCacheDir || !*NewsCacheDir) return 0; - strfcpy (dir, NewsCacheDir, sizeof (dir)); + m_strcpy(dir, sizeof(dir), NewsCacheDir); mutt_expand_path (dir, sizeof (dir)); if (lstat (dir, &st) || (st.st_mode & S_IFDIR) == 0) { @@ -208,8 +208,8 @@ static int nntp_parse_cacheindex (NNTP_SERVER * news) rewind (index); while (fgets (buf, sizeof (buf), index)) { buf[m_strlen(buf) - 1] = 0; /* strip ending '\n' */ - if (!str_ncmp (buf, "#: ", 3) && - !str_casecmp (buf + 3, news->conn->account.host)) + if (!m_strncmp(buf, "#: ", 3) && + !m_strcasecmp(buf + 3, news->conn->account.host)) break; } while (fgets (buf, sizeof (buf), index)) { @@ -299,7 +299,7 @@ int nntp_parse_url (const char *server, ACCOUNT * acct, *group = '\0'; if (url.path) - strfcpy (group, url.path, group_len); + m_strcpy(group, group_len, url.path); ret = mutt_account_fromurl (acct, &url); } @@ -672,7 +672,7 @@ static int mutt_update_list_file (char *filename, char *section, c = buf; while (*c && *c != '\n') c++; c[0] = 0; /* strip EOL */ - if (!strncmp (buf, "#: ", 3) && !str_casecmp (buf+3, section)) + if (!strncmp (buf, "#: ", 3) && !m_strcasecmp(buf+3, section)) done++; } if (r != EOF && !done) { @@ -810,7 +810,7 @@ static int nntp_update_cacheindex (NNTP_SERVER * serv, NNTP_DATA * data) data->firstMessage, data->lastLoaded); } else { - strfcpy (file, serv->cache, sizeof (file)); + m_strcpy(file, sizeof(file), serv->cache); snprintf (buf, sizeof (buf), "ALL %s 0 %d", file, (int) serv->newgroups_time); } @@ -856,7 +856,7 @@ int nntp_save_cache_index (NNTP_SERVER * news) f = safe_fopen (file, "w"); } else { - strfcpy (buf, news->conn->account.host, sizeof (buf)); + m_strcpy(buf, sizeof(buf), news->conn->account.host); f = mutt_mkname (buf); news->cache = m_strdup(buf); nntp_cache_expand (file, buf);