aboutsummaryrefslogtreecommitdiff
path: root/mail/mmr
diff options
context:
space:
mode:
authorChristian Weisgerber <naddy@FreeBSD.org>2002-10-26 00:27:50 +0000
committerChristian Weisgerber <naddy@FreeBSD.org>2002-10-26 00:27:50 +0000
commit940d110922f9f93fa1d4dc6de5b238212c67ca58 (patch)
treebf8c7ca8fc10b03d7779ca46f0a50d950148e7fd /mail/mmr
parentb4dd49f28977618f4104ab4eabe8cac13171b050 (diff)
downloadports-940d110922f9f93fa1d4dc6de5b238212c67ca58.tar.gz
ports-940d110922f9f93fa1d4dc6de5b238212c67ca58.zip
Notes
Diffstat (limited to 'mail/mmr')
-rw-r--r--mail/mmr/Makefile3
-rw-r--r--mail/mmr/files/patch-ae60
-rw-r--r--mail/mmr/files/patch-iobottle.cpp22
-rw-r--r--mail/mmr/files/patch-listings.cpp20
-rw-r--r--mail/mmr/files/patch-main.cpp197
-rw-r--r--mail/mmr/files/patch-mime.cpp20
-rw-r--r--mail/mmr/files/patch-terminal.cpp20
7 files changed, 317 insertions, 25 deletions
diff --git a/mail/mmr/Makefile b/mail/mmr/Makefile
index 29e814bc0873..f3d4531868ca 100644
--- a/mail/mmr/Makefile
+++ b/mail/mmr/Makefile
@@ -14,9 +14,6 @@ MAINTAINER= ports@FreeBSD.org
ALL_TARGET= # empty
-post-extract:
- @${RM} -f ${WRKSRC}/*.o
-
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/mmr ${PREFIX}/bin
@${MKDIR} ${PREFIX}/share/examples/mmr
diff --git a/mail/mmr/files/patch-ae b/mail/mmr/files/patch-ae
index b94a2570fbf6..7c43b2a665a2 100644
--- a/mail/mmr/files/patch-ae
+++ b/mail/mmr/files/patch-ae
@@ -1,20 +1,40 @@
---- mailmsg.cpp.orig Sat Jan 29 19:09:17 2000
-+++ mailmsg.cpp Fri Mar 31 03:37:43 2000
-@@ -142,7 +142,7 @@
- continue;
- }
- schar =
-- ((*status == ' ') ? "R" : status);
-+ ((*status == ' ') ? (char *)"R" : status);
- *sptr = *schar;
- NewField("Status", schar);
- status_written = 1;
-@@ -157,7 +157,7 @@
- char *schar;
- sptr = new char[strlen("Status: ")+2+1];
- strcpy(sptr, "Status: ");
-- schar = ((*status == ' ') ? "R" : status);
-+ schar = ((*status == ' ') ? (char *)"R" : status);
- strcat(sptr, schar); strcat(sptr, "\n");
- QueueRing(ringbuf, sptr, strlen(sptr));
- delete[] sptr;
+--- mailmsg.cpp.orig Tue May 30 01:59:06 2000
++++ mailmsg.cpp Fri Oct 25 13:54:39 2002
+@@ -18,7 +18,7 @@
+ mailmsg::boundary[] = { "From", NULL };
+
+ /* This is called by a program to create a new list of messages */
+-mailmsg:: mailmsg(IObottle *mailfile, void (*oncreate)(mailmsg *ptr) = NULL)
++mailmsg:: mailmsg(IObottle *mailfile, void (*oncreate)(mailmsg *ptr))
+ {
+ struct mbox_data *MBox;
+
+@@ -173,7 +173,7 @@
+ /* Simple corruption check -- early end? */
+ if ( strncmp(newdata, "From ",
+ strlen("From ")) == 0 ) {
+- cerr << "Warning: Corrupt mailfile?" << endl;
++ std::cerr << "Warning: Corrupt mailfile?" << std::cerr;
+ break;
+ }
+
+@@ -338,7 +338,7 @@
+
+ /* See/Set the status of the message */
+ const char *
+-mailmsg:: Status(int in_listing = 0)
++mailmsg:: Status(int in_listing)
+ {
+ /* Thread aware. :) */
+ if ( in_listing && (mbox->showthreads == HIDE_THREADS) ) {
+@@ -664,8 +664,8 @@
+
+ /* Sanity check */
+ if ( i != (strlen(newsubject)-RElen) ) {
+- cerr << "Warning: RE stripping: possible corruption!"
+- << endl;
++ std::cerr << "Warning: RE stripping: possible corruption!"
++ << std::cerr;
+ }
+
+ /* Make it the new subject */
diff --git a/mail/mmr/files/patch-iobottle.cpp b/mail/mmr/files/patch-iobottle.cpp
index bae138d1905c..43636ee5379f 100644
--- a/mail/mmr/files/patch-iobottle.cpp
+++ b/mail/mmr/files/patch-iobottle.cpp
@@ -1,7 +1,25 @@
---- iobottle.cpp.orig Mon Oct 21 23:30:11 2002
-+++ iobottle.cpp Mon Oct 21 23:30:37 2002
+--- iobottle.cpp.orig Fri Aug 6 05:39:19 1999
++++ iobottle.cpp Fri Oct 25 13:58:58 2002
@@ -1,3 +1,4 @@
+#include <string.h>
extern "C" {
#include <stdlib.h>
+@@ -97,7 +98,7 @@
+ }
+ /* If buf[len-1] is a null, then a newline should be written */
+ size_t
+-IObottle:: writeline(char *buf, size_t len = 0) {
++IObottle:: writeline(char *buf, size_t len) {
+ int lenwritten = 0;
+
+ if ( fputs(buf, wfp) >= 0 )
+@@ -134,7 +135,7 @@
+ return(0);
+ }
+ int
+-IObottle:: set_time(time_t actime, time_t modtime = 0) {
++IObottle:: set_time(time_t actime, time_t modtime) {
+ struct stat sb;
+ struct utimbuf ub;
+
diff --git a/mail/mmr/files/patch-listings.cpp b/mail/mmr/files/patch-listings.cpp
new file mode 100644
index 000000000000..a03a1bf1234b
--- /dev/null
+++ b/mail/mmr/files/patch-listings.cpp
@@ -0,0 +1,20 @@
+--- listing.cpp.orig Fri Oct 25 14:00:55 2002
++++ listing.cpp Fri Oct 25 14:01:12 2002
+@@ -40,7 +40,7 @@
+ }
+
+ void
+-Msg_Listing:: ReSize(int modified = 1)
++Msg_Listing:: ReSize(int modified)
+ {
+ if ( modified ) {
+ helppane->reset();
+@@ -1197,7 +1197,7 @@
+ }
+
+ mailmsg *
+-Msg_Listing:: View(mailmsg *which, MIME_body *body = NULL)
++Msg_Listing:: View(mailmsg *which, MIME_body *body)
+ {
+ mailmsg *newmsg, *holder;
+
diff --git a/mail/mmr/files/patch-main.cpp b/mail/mmr/files/patch-main.cpp
new file mode 100644
index 000000000000..61895279dba1
--- /dev/null
+++ b/mail/mmr/files/patch-main.cpp
@@ -0,0 +1,197 @@
+--- main.cpp.orig Fri Oct 25 13:49:34 2002
++++ main.cpp Fri Oct 25 13:49:52 2002
+@@ -38,12 +38,12 @@
+ void LoadStatus(mailmsg *message)
+ {
+ static char twiddle[] = "-+|+";
+- cerr << "\b\b" << twiddle[message->Index()%4] << ')';
++ std::cerr << "\b\b" << twiddle[message->Index()%4] << ')';
+ }
+ void QuitStatus(mailmsg *message)
+ {
+ static char twiddle[] = "-+|+";
+- cerr << "\b\b" << twiddle[message->Index()%4] << ')';
++ std::cerr << "\b\b" << twiddle[message->Index()%4] << ')';
+ }
+
+ void CleanupMessages(void)
+@@ -149,26 +149,26 @@
+ case SIGHUP:
+ if ( messages )
+ messages->Abort();
+- cout << "\rExiting because of hang-up signal!" << endl;
++ std::cout << "\rExiting because of hang-up signal!" << std::cerr;
+ break;
+ case SIGINT:
+ case SIGQUIT:
+ if ( messages )
+ messages->Abort();
+- cout << "\rExiting because of keyboard interrupt!" <<
+- endl;
++ std::cout << "\rExiting because of keyboard interrupt!" <<
++ std::cerr;
+ break;
+ case SIGSEGV:
+ case SIGBUS:
+ if ( messages )
+ messages->Abort();
+- cout << "\rExiting because of program bug!" << endl;
++ std::cout << "\rExiting because of program bug!" << std::cerr;
+ break;
+ case SIGTERM:
+ if ( messages )
+ messages->Abort();
+- cout << "\rExiting because of termination signal!" <<
+- endl;
++ std::cout << "\rExiting because of termination signal!" <<
++ std::cerr;
+ break;
+ default:
+ break;
+@@ -178,17 +178,17 @@
+ char cmdbuf[BUFSIZ];
+
+ if ( messages ) {
+- cout << "Saving messages: ( )" << flush;
++ std::cout << "Saving messages: ( )" << std::flush;
+ messages->OnSave(QuitStatus);
+ CleanupMessages();
+ messages = NULL;
+- cout << " -- Done." << endl;
++ std::cout << " -- Done." << std::cerr;
+
+ /* Check for new mail */
+ time_t atime, mtime;
+ mailfile->get_time(&atime, &mtime);
+ if ( mtime > atime )
+- cout << "You have NEW mail!" << endl;
++ std::cout << "You have NEW mail!" << std::cerr;
+ }
+ if ( was_compressed ) {
+ /* For some reason, this crashes on some mailboxes
+@@ -202,9 +202,9 @@
+
+ /* Any final mailfile cleanup */
+ if ( was_compressed ) {
+- cout << "Compressing mailfile..." << flush;
++ std::cout << "Compressing mailfile..." << std::flush;
+ (void) system(cmdbuf);
+- cout << "Done." << endl;
++ std::cout << "Done." << std::cerr;
+ /* For some reason, this crashes on some mailboxes
+ delete[] cmdbuf;
+ */
+@@ -447,12 +447,12 @@
+
+ void Usage(char *prog)
+ {
+- cout <<
+-Version << endl << endl <<
+-"Usage: " << prog << " [-s subject] recipient1 recipient2 ... " << endl <<
+-"or... " << prog << " -c" << endl <<
+-"or... " << prog << " [-r initfile] [-f mailbox]" << endl <<
+- endl;
++ std::cout <<
++Version << std::cerr << std::cerr <<
++"Usage: " << prog << " [-s subject] recipient1 recipient2 ... " << std::cerr <<
++"or... " << prog << " -c" << std::cerr <<
++"or... " << prog << " [-r initfile] [-f mailbox]" << std::cerr <<
++ std::cerr;
+ }
+
+ main(int argc, char *argv[])
+@@ -511,7 +511,7 @@
+ /* Command line mailing? */
+ if ( *argv ) {
+ if ( NewMail(argv, subject) < 0 ) {
+- cerr << "Mail send failed!" << endl;
++ std::cerr << "Mail send failed!" << std::cerr;
+ quit(-1);
+ }
+ quit(0);
+@@ -526,7 +526,7 @@
+ ((mailpath=(char *)getenv("MAIL")) == NULL) ) {
+ if ( ((whoami=getlogin()) == NULL) &&
+ ((whoami=mycuserid()) == NULL) ) {
+- cerr << "Who are you? -- Aborting!" << endl;
++ std::cerr << "Who are you? -- Aborting!" << std::cerr;
+ quit(-1);
+ }
+ mailpath = new char[strlen(MAILPATH)+1+strlen(whoami)+1];
+@@ -546,25 +546,25 @@
+ struct stat sb;
+
+ if ( stat(mailpath, &sb) < 0 ) {
+- cout << mailpath << " is not readable" << endl;
++ std::cout << mailpath << " is not readable" << std::cerr;
+ quit(0);
+ }
+ if ( sb.st_size == 0 ) {
+- cout << "No mail." << endl;
++ std::cout << "No mail." << std::cerr;
+ quit(0);
+ }
+ if ( check_mail ) {
+ if ( sb.st_mtime < sb.st_atime )
+- cout << "You have mail." << endl;
++ std::cout << "You have mail." << std::cerr;
+ else
+- cout << "You have NEW mail." << endl;
++ std::cout << "You have NEW mail." << std::cerr;
+ quit(0);
+ }
+
+ /* Check to see if the lock file exists */
+ if ( CheckLock(mailpath) ) {
+- cout << "Lockfile (" << mailpath << ".lock) exists!" << endl;
+- cout << "Please try again later..." << endl;
++ std::cout << "Lockfile (" << mailpath << ".lock) exists!" << std::cerr;
++ std::cout << "Please try again later..." << std::cerr;
+ quit(0);
+ }
+
+@@ -592,10 +592,10 @@
+
+ /* Perform decompression */
+ if ( decompress ) {
+- cout << "Uncompressing mailfile..." << flush;
++ std::cout << "Uncompressing mailfile..." << std::flush;
+ if ( system(cmdbuf) == 0 )
+ was_compressed = 1;
+- cout << "Done." << endl;
++ std::cout << "Done." << std::cerr;
+ }
+ delete[] cmdbuf;
+ }
+@@ -616,11 +616,11 @@
+ char buffer[BUFSIZ];
+
+ if ( mailfile->fail() || mailfile->eof() ) {
+- cout << "No mail in " << mailpath << endl;
++ std::cout << "No mail in " << mailpath << std::cerr;
+ quit(0);
+ }
+ if ( mailfile->readline(buffer, BUFSIZ) == 1 ) {
+- cout << "Newline at start of mailfile -- aborting!" << endl;
++ std::cout << "Newline at start of mailfile -- aborting!" << std::cerr;
+ quit(-1);
+ }
+ mailfile->seekg(0);
+@@ -629,7 +629,7 @@
+ MIME_body::MIME_Ignore(GetStartVar("MIME_ignore"));
+
+ /* If we have succeeded in opening the mailfile, load mail */
+- cout << "Loading messages: ( )" << flush;
++ std::cout << "Loading messages: ( )" << std::flush;
+ messages = new mailmsg(mailfile, LoadStatus);
+ if ( ((current = messages->ByStatus("N")) == NULL) &&
+ ((current = messages->ByStatus("O")) == NULL) ) {
+@@ -637,7 +637,7 @@
+ for ( current = messages; newmsg = current->Next(); )
+ current = newmsg;
+ }
+- cout << " -- Done." << endl;
++ std::cout << " -- Done." << std::cerr;
+ sleep(1);
+ mailfile->get_time(NULL, &last_mtime);
+ mailfile->Size(&last_size);
diff --git a/mail/mmr/files/patch-mime.cpp b/mail/mmr/files/patch-mime.cpp
new file mode 100644
index 000000000000..ea7732a2cefd
--- /dev/null
+++ b/mail/mmr/files/patch-mime.cpp
@@ -0,0 +1,20 @@
+--- mime.cpp.orig Fri Oct 25 13:55:40 2002
++++ mime.cpp Fri Oct 25 13:56:15 2002
+@@ -102,7 +102,7 @@
+
+ /* The MIME_body class constructor */
+ MIME_body:: MIME_body(IObottle *RawFile, char *endings[],
+- MIME_body *lineage = NULL)
++ MIME_body *lineage)
+ {
+ MD5_CTX md5_ctx;
+ int i;
+@@ -652,7 +652,7 @@
+ length) to a new IO stream with SaveRaw(), or these changes will be lost.
+ */
+ int
+-MIME_body:: AddPart(const char *file, int is_mime = 0)
++MIME_body:: AddPart(const char *file, int is_mime)
+ {
+ MD5_CTX md5_ctx;
+ int (*EncodeFile)(FILE *, IObottle *);
diff --git a/mail/mmr/files/patch-terminal.cpp b/mail/mmr/files/patch-terminal.cpp
new file mode 100644
index 000000000000..6dfed8fe0e6d
--- /dev/null
+++ b/mail/mmr/files/patch-terminal.cpp
@@ -0,0 +1,20 @@
+--- terminal.cpp.orig Fri Oct 25 13:51:29 2002
++++ terminal.cpp Fri Oct 25 13:51:50 2002
+@@ -11,7 +11,7 @@
+ int Terminal::wasraw = 0;
+ int Terminal::maxwait = 0;
+
+-Terminal:: Terminal(int makeraw = 1)
++Terminal:: Terminal(int makeraw)
+ {
+ /* Initialize curses, if necessary */
+ if ( refcount == 0 ) {
+@@ -133,7 +133,7 @@
+
+ /* Input routines */
+ int
+-Terminal:: waitchar(WINDOW *the_win = NULL)
++Terminal:: waitchar(WINDOW *the_win)
+ {
+ int ch, t;
+