- int result;
- va_list ap;
- char buffer[BUFSIZ];
-
-#ifdef NNTP
- char **ap;
-#endif
-
- va_start(ap, fmt);
-#ifndef NNTP
- /* needs to be fixed... va_end needs to be added */
- snprintf (buffer, sizeof(buffer), "XTND %s", fmt);
- result = traverse (action, buffer, a, b, c, d);
- va_end(ap);
- return result;
-#else /* NNTP */
- snprintf (buffer, sizeof(buffer), fmt, a, b, c, d);
- ap = brkstring (buffer, " ", "\n"); /* a hack, i know... */
-
- if (!mh_strcasecmp(ap[0], "x-bboards")) { /* XTND "X-BBOARDS group */
- /* most of these parameters are meaningless under NNTP.
- * bbc.c was modified to set AKA and LEADERS as appropriate,
- * the rest are left blank.
- */
- return OK;
- }
- if (!mh_strcasecmp (ap[0], "archive") && ap[1]) {
- snprintf (xtnd_name, sizeof(xtnd_name), "%s", ap[1]); /* save the name */
- xtnd_last = 0;
- xtnd_first = 1; /* setup to fail in pop_stat */
- return OK;
- }
- if (!mh_strcasecmp (ap[0], "bboards")) {
-
- if (ap[1]) { /* XTND "BBOARDS group" */
- snprintf (xtnd_name, sizeof(xtnd_name), "%s", ap[1]); /* save the name */
- if (command("GROUP %s", xtnd_name) == NOTOK)
- return NOTOK;
-
- /* action must ignore extra args */
- strncpy (buffer, response, sizeof(buffer));
- ap = brkstring (response, " ", "\n");/* "211 nart first last g" */
- xtnd_first = atoi (ap[2]);
- xtnd_last = atoi (ap[3]);
-
- (*action) (buffer);
- return OK;
-
- } else { /* XTND "BBOARDS" */
- return traverse (action, "LIST", a, b, c, d);
- }
- }
- return NOTOK; /* unknown XTND command */
-#endif /* NNTP */