From 38b3c2756cc93f44a633b8fa5b3a3a2925006a78 Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Mon, 15 Jul 2002 20:46:07 +0000
Subject: [PATCH] Removed #inclusion of the now defunct post.h. mail_t and
 post_t are now defined as SMBLIB's idxrec_t.

---
 src/sbbs3/mail.cpp     | 11 +++--------
 src/sbbs3/readmsgs.cpp | 16 ++++++----------
 2 files changed, 9 insertions(+), 18 deletions(-)

diff --git a/src/sbbs3/mail.cpp b/src/sbbs3/mail.cpp
index 9a614596b1..d7a126aabf 100644
--- a/src/sbbs3/mail.cpp
+++ b/src/sbbs3/mail.cpp
@@ -265,14 +265,9 @@ mail_t* DLLCALL loadmail(smb_t* smb, ulong* msgs, uint usernumber
 			smb_unlocksmbhdr(smb);
 			return(NULL); 
 		}
-		mail[l].offset=idx.offset;
-		mail[l].number=idx.number;
-		mail[l].to=idx.to;
-		mail[l].from=idx.from;
-		mail[l].subj=idx.subj;
-		mail[l].time=idx.time;
-		mail[l].attr=idx.attr;
-		l++; }
+		mail[l]=idx;
+		l++; 
+	}
 	smb_unlocksmbhdr(smb);
 	*msgs=l;
 	return(mail);
diff --git a/src/sbbs3/readmsgs.cpp b/src/sbbs3/readmsgs.cpp
index 0603bad936..02dae7a819 100644
--- a/src/sbbs3/readmsgs.cpp
+++ b/src/sbbs3/readmsgs.cpp
@@ -36,7 +36,6 @@
  ****************************************************************************/
 
 #include "sbbs.h"
-#include "post.h"
 
 int sbbs_t::sub_op(uint subnum)
 {
@@ -237,16 +236,13 @@ post_t HUGE16 * sbbs_t::loadposts(long *posts, uint subnum, ulong ptr, long mode
 			if(skip)
 				continue; }
 
-		post[l].offset=idx.offset;
-		post[l].number=idx.number;
-		post[l].to=idx.to;
-		post[l].from=idx.from;
-		post[l].subj=idx.subj;
-		l++; }
+		memcpy(&post[l],&idx,sizeof(idx));
+		l++; 
+	}
 	smb_unlocksmbhdr(&smb);
-	if(!l) {
-		LFREE(post);
-		post=NULL; }
+	if(!l)
+		FREE_AND_NULL(post);
+
 	(*posts)=l;
 	return(post);
 }
-- 
GitLab