chiark / gitweb /
REORG Delete everything that's not innduct or build system or changed for innduct
[innduct.git] / lib / sendarticle.c
diff --git a/lib/sendarticle.c b/lib/sendarticle.c
deleted file mode 100644 (file)
index 4e514fb..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*  $Id: sendarticle.c 4076 2000-10-05 00:36:52Z rra $
-**
-*/
-
-#include "config.h"
-#include "clibrary.h"
-#include "libinn.h"
-#include "nntp.h"
-
-
-/*
-**  Send a string of one or more lines down a stdio FILE using RFC977
-**  conventions.  Return -1 on error.
-*/
-int NNTPsendarticle(char *p, FILE *F, bool Terminate)
-{
-    char *next;
-
-    for (; p && *p; next[-1] = '\n', p = next) {
-       /* Get pointer to next line.  Truncate long lines. */
-       if ((next = strchr(p, '\n')) != NULL)
-           *next++ = '\0';
-
-       /* Write line. */
-       if (*p == '.' && putc('.', F) == EOF)
-           return -1;
-       if (fprintf(F, "%s\r\n", p) == EOF)
-           return -1;
-
-       /* Done? */
-       if (next == NULL)
-           break;
-    }
-
-    if (Terminate && fprintf(F, ".\r\n") == EOF)
-       return -1;
-
-    return fflush(F) == EOF || ferror(F) ? -1 : 0;
-}