From ff98d6ea831d7d2af6b52ac3cfa288daefc5aedb Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Thu, 24 Aug 2006 00:53:47 +0000
Subject: [PATCH] Use Deuce's new removecase() macro/function - no need to use
 fexistcase() now.

---
 src/sbbs3/writemsg.cpp | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/src/sbbs3/writemsg.cpp b/src/sbbs3/writemsg.cpp
index 18fcb9e20f..4e814cf135 100644
--- a/src/sbbs3/writemsg.cpp
+++ b/src/sbbs3/writemsg.cpp
@@ -246,7 +246,7 @@ bool sbbs_t::writemsg(char *fname, char *top, char *title, long mode, int subnum
 		if(useron.xedit && cfg.xedit[useron.xedit-1]->misc&XTRN_LWRCASE)
 			strlwr(tmp);
 		sprintf(str,"%s%s",cfg.node_dir,tmp);
-		remove(str); 
+		removecase(str); 
 	}
 
 	if(!online || sys_status&SS_ABORT) {
@@ -337,9 +337,9 @@ bool sbbs_t::writemsg(char *fname, char *top, char *title, long mode, int subnum
 		if(cfg.xedit[useron.xedit-1]->misc&XTRN_SH)
 			ex_mode|=EX_SH;
 
-		if(!linesquoted && fexistcase(msgtmp))
-			remove(msgtmp);
-		if(linesquoted) {
+		if(!linesquoted)
+			removecase(msgtmp);
+		else {
 			qlen=flength(msgtmp);
 			qtime=fdate(msgtmp); 
 		}
@@ -517,8 +517,7 @@ void sbbs_t::editor_inf(int xeditnum,char *dest, char *title, long mode
 	}
 	else {
 		SAFEPRINTF(str,"%sRESULT.ED",cfg.node_dir);
-		if(fexistcase(str))
-			remove(str);
+		removecase(str);
 		strcpy(tmp,"EDITOR.INF");
 		if(cfg.xedit[xeditnum]->misc&XTRN_LWRCASE)
 			strlwr(tmp);
@@ -903,14 +902,12 @@ void sbbs_t::editfile(char *fname)
 
 	maxlines=cfg.level_linespermsg[useron.level];
 	sprintf(path,"%sQUOTES.TXT",cfg.node_dir);
-	if(fexistcase(path))
-		remove(path);
+	removecase(path);
 
 	if(useron.xedit) {
 
 		msg_tmp_fname(useron.xedit, msgtmp, sizeof(msgtmp));
-		if(fexist(msgtmp))
-			remove(msgtmp);
+		removecase(msgtmp);
 
 		SAFECOPY(path,fname);
 		if(fexistcase(path))
@@ -1199,8 +1196,7 @@ void sbbs_t::editmsg(smbmsg_t *msg, uint subnum)
 		return;
 
 	msg_tmp_fname(useron.xedit, msgtmp, sizeof(msgtmp));
-	if(fexist(msgtmp))
-		remove(msgtmp);
+	removecase(msgtmp);
 	msgtotxt(msg,msgtmp,0,1);
 	editfile(msgtmp);
 	length=flength(msgtmp);
-- 
GitLab