🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nn
Article #10055

problems and patches

#10055
From: Felicia Neff
Date: Wed, 10 Jul 2002 19:39
69 lines
3408 bytes
I am running nn-6.6.4 on NetBSD-1.5.2.

Problem #1) mail option not working correctly
If, after typing a reply, you attempt to mail a message rather than post
it, you get prompted for a To: line.  However, that To: line doesn't get
passed to the mailer (if the mailer is mutt, elm or pine, at least), which
causes mutt and elm to fail.  The following patch fixes this:
--- aux.c.orig2 Wed Jul 10 13:23:31 2002
+++ aux.c       Wed Jul 10 13:15:23 2002
@@ -286,6 +286,7 @@
     char            lookfor[16], send[8], sent[8], sendpr[8], message[8];
     int             x, act = response_dflt_answer[0];
     struct stat     statb;
+    char            *ptr;

     if (strcmp(prog, "COMPLETE") != 0) {
        poster = NULL;
@@ -568,7 +569,9 @@
        }

        if (cc[0] != CR) {
-           strcpy(final, tempsuffix(temp_file, "F"));
+         if ((ptr = strchr(cc, '\n')) != NULL)
+           *ptr = '\0';
+         strcpy(final, tempsuffix(temp_file, "F"));
            tempf = open_file(final, OPEN_CREATE);
            x = fprintf(tempf, "To: %s\n", cc);
            fclose(tempf);
@@ -576,7 +579,7 @@
                    temp_file, final);
            system(buf);
            if (mailer_pipe_input) {
-               sprintf(buf, "%s < %s", mailer_program, final);
+               sprintf(buf, "%s %s < %s", mailer_program, cc, final);
                x = system(buf);
            } else {
                ap = args;


Problem #2) news-record not creating correct mailbox format
If news-record is set, it is supposed to create a file in mailbox format.
However, it is failing to put a newline after each message (or more
importantly before the From of the next message).  The following patch
fixes this:
--- aux.c.orig3 Wed Jul 10 14:56:27 2002
+++ aux.c       Wed Jul 10 15:08:45 2002
@@ -642,6 +642,11 @@
            fclose(rec);
            sprintf(buf, "cat %s >> %s", temp_file, record);
            system(buf);
+           rec = open_file(record, OPEN_APPEND);
+           if (rec != NULL) {
+             fprintf(rec, "\n");
+             fclose(rec);
+           }
        }
     }
     if (!strcmp("reply", prog) || !strcmp("forward", prog) ||
!strcmp("mail", prog)) {


Problem #3) hold option does not hold message
After a message is composed, you are given the option of holding it to
complete later.  However, in 6.6.4, the message is not held because the
appropriate files are not created.  I don't have a patch for this.

Thanks -- Felicia

Technical Details
Message-ID: <Pine.NEB.4.44.0207101529270.19951-100000@panix2.panix.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nn.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!panix!panix2.panix.com!fn

Show Full Headers
Complete Article Headers
Message-ID: <Pine.NEB.4.44.0207101529270.19951-100000@panix2.panix.com>
Subject: problems and patches
Date: Wed, 10 Jul 2002 15:39:40 -0400
From: Felicia Neff <fn@panix.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nn.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!panix!panix2.panix.com!fn
Newsgroups: news.software.nn
Organization: PANIX Public Access Internet and UNIX, NYC
Lines: 68
NNTP-Posting-Host: panix2.panix.com
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Trace: reader1.panix.com 1026329987 7489 166.84.1.2 (10 Jul 2002 19:39:47 GMT)
X-Complaints-To: abuse@panix.com
NNTP-Posting-Date: Wed, 10 Jul 2002 19:39:47 +0000 (UTC)