X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=newsrc.c;h=10a539f02c4b4bccff3ba79597cd288553ce3694;hb=39d11f5b3feb125654d5c2a4e8f93637a12706c3;hp=cfa48d1447ba8e6aca3e0b6e50428973762c136f;hpb=c3e57678c8be193fc137854020f3a90887be97c9;p=apps%2Fmadmutt.git diff --git a/newsrc.c b/newsrc.c index cfa48d1..10a539f 100644 --- a/newsrc.c +++ b/newsrc.c @@ -70,7 +70,7 @@ static int nntp_parse_newsrc_line (NNTP_SERVER * news, char *line) strfcpy (group, line, len); if ((data = (NNTP_DATA *) hash_find (news->newsgroups, group)) == NULL) { data = - (NNTP_DATA *) safe_calloc (1, sizeof (NNTP_DATA) + strlen (group) + 1); + (NNTP_DATA *) safe_calloc (1, sizeof (NNTP_DATA) + mutt_strlen (group) + 1); data->group = (char *) data + sizeof (NNTP_DATA); strcpy (data->group, group); data->nserv = news; @@ -201,7 +201,7 @@ static int nntp_parse_cacheindex (NNTP_SERVER * news) return 0; rewind (index); while (fgets (buf, sizeof (buf), index)) { - buf[strlen (buf) - 1] = 0; /* strip ending '\n' */ + buf[mutt_strlen (buf) - 1] = 0; /* strip ending '\n' */ if (!mutt_strncmp (buf, "#: ", 3) && !mutt_strcasecmp (buf + 3, news->conn->account.host)) break; @@ -224,7 +224,7 @@ static int nntp_parse_cacheindex (NNTP_SERVER * news) if ((data = (NNTP_DATA *) hash_find (news->newsgroups, buf)) == NULL) { data = (NNTP_DATA *) safe_calloc (1, - sizeof (NNTP_DATA) + strlen (buf) + 1); + sizeof (NNTP_DATA) + mutt_strlen (buf) + 1); data->group = (char *) data + sizeof (NNTP_DATA); strcpy (data->group, buf); data->nserv = news; @@ -339,7 +339,7 @@ NNTP_SERVER *mutt_select_newsserver (char *server) return NULL; } - buf = p = safe_calloc (strlen (server) + 10, sizeof (char)); + buf = p = safe_calloc (mutt_strlen (server) + 10, sizeof (char)); if (url_check_scheme (server) == U_UNKNOWN) { strcpy (buf, "nntp://"); p = strchr (buf, '\0'); @@ -508,8 +508,8 @@ static void nntp_create_newsrc_line (NNTP_DATA * data, char **buf, line = *buf + (*pline - line); } strcpy (line, data->group); - len -= strlen (line) + 1; - line += strlen (line); + len -= mutt_strlen (line) + 1; + line += mutt_strlen (line); *line++ = data->subscribed ? ':' : '!'; *line++ = ' '; *line = '\0'; @@ -642,7 +642,7 @@ int mutt_newsrc_update (NNTP_SERVER * news) continue; nntp_create_newsrc_line (data, &buf, &line, &llen); dprint (2, (debugfile, "Added to newsrc: %s", line)); - line += strlen (line); + line += mutt_strlen (line); } /* newrc being fully rewritten */ if (news->newsrc && @@ -668,7 +668,7 @@ static FILE *mutt_mkname (char *s) return fp; nntp_cache_expand (buf, "cache-XXXXXX"); - pc = buf + strlen (buf) - 12; /* positioning to "cache-XXXXXX" */ + pc = buf + mutt_strlen (buf) - 12; /* positioning to "cache-XXXXXX" */ if ((fd = mkstemp (buf)) == -1) return NULL; strcpy (s, pc); /* generated name */ @@ -875,7 +875,7 @@ NNTP_DATA *mutt_newsgroup_subscribe (NNTP_SERVER * news, char *group) return NULL; if (!(data = (NNTP_DATA *) hash_find (news->newsgroups, group))) { data = - (NNTP_DATA *) safe_calloc (1, sizeof (NNTP_DATA) + strlen (group) + 1); + (NNTP_DATA *) safe_calloc (1, sizeof (NNTP_DATA) + mutt_strlen (group) + 1); data->group = (char *) data + sizeof (NNTP_DATA); strcpy (data->group, group); data->nserv = news;