- return (src);
-}
-
-#ifdef USE_NNTP
-static const char *newsgroup_format_str (char *dest, ssize_t destlen, char op,
- const char *src, const char *fmt,
- const char *ifstring,
- const char *elsestring,
- unsigned long data,
- format_flag flags)
-{
- char fn[STRING], tmp[STRING];
- FOLDER *folder = (FOLDER *) data;
-
- switch (op) {
- case 'C':
- snprintf (tmp, sizeof (tmp), "%%%sd", fmt);
- snprintf (dest, destlen, tmp, folder->num + 1);
- break;
-
- case 'f':
- m_strcpy(fn, sizeof(fn), folder->ff->name);
- snprintf (tmp, sizeof (tmp), "%%%ss", fmt);
- snprintf (dest, destlen, tmp, fn);
- break;
-
- case 'N':
- snprintf (tmp, sizeof (tmp), "%%%sc", fmt);
- if (folder->ff->nd->subscribed)
- snprintf (dest, destlen, tmp, ' ');
- else
- snprintf (dest, destlen, tmp, folder->ff->new ? 'N' : 'u');
- break;
-
- case 'M':
- snprintf (tmp, sizeof (tmp), "%%%sc", fmt);
- if (folder->ff->nd->deleted)
- snprintf (dest, destlen, tmp, 'D');
- else
- snprintf (dest, destlen, tmp, folder->ff->nd->allowed ? ' ' : '-');
- break;
-
- case 's':
- if (flags & M_FORMAT_OPTIONAL) {
- if (folder->ff->nd->unread != 0)
- m_strformat (dest, destlen, ifstring, newsgroup_format_str,
- data, flags);
- else
- m_strformat (dest, destlen, elsestring, newsgroup_format_str,
- data, flags);
- }
- else if (Context && Context->data == folder->ff->nd) {
- snprintf (tmp, sizeof (tmp), "%%%sd", fmt);
- snprintf (dest, destlen, tmp, Context->unread);
- }
- else {
- snprintf (tmp, sizeof (tmp), "%%%sd", fmt);
- snprintf (dest, destlen, tmp, folder->ff->nd->unread);
- }
- break;
-
- case 'n':
- if (Context && Context->data == folder->ff->nd) {
- snprintf (tmp, sizeof (tmp), "%%%sd", fmt);
- snprintf (dest, destlen, tmp, Context->new);
- }
- else if (option (OPTMARKOLD) &&
- folder->ff->nd->lastCached >= folder->ff->nd->firstMessage &&
- folder->ff->nd->lastCached <= folder->ff->nd->lastMessage) {
- snprintf (tmp, sizeof (tmp), "%%%sd", fmt);
- snprintf (dest, destlen, tmp,
- folder->ff->nd->lastMessage - folder->ff->nd->lastCached);
- }
- else {
- snprintf (tmp, sizeof (tmp), "%%%sd", fmt);
- snprintf (dest, destlen, tmp, folder->ff->nd->unread);
- }
- break;