From b74af43cff775a77d37d4f086692b6d5707077df Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Tue, 30 Apr 2002 23:59:05 +0000
Subject: [PATCH] Replaced _fsopen usage with fopen.

---
 src/uifc/uifcc.c | 23 ++---------------------
 1 file changed, 2 insertions(+), 21 deletions(-)

diff --git a/src/uifc/uifcc.c b/src/uifc/uifcc.c
index 42437ae075..3d57366226 100644
--- a/src/uifc/uifcc.c
+++ b/src/uifc/uifcc.c
@@ -110,7 +110,6 @@ static void delay(int msec);
 static int ugetstr(char *outstr, int max, long mode);
 static int wherey(void);
 static int wherex(void);
-static FILE * _fsopen(char *pathname, char *mode, int flags);
 static int cprintf(char *fmat, ...);
 static void cputs(char *str);
 static void gotoxy(int x, int y);
@@ -1668,7 +1667,7 @@ void help()
     buf[j]='Ù';
 
 	if(!api->helpbuf) {
-		if((fp=_fsopen(api->helpixbfile,"rb",SH_DENYWR))==NULL)
+		if((fp=fopen(api->helpixbfile,"rb"))==NULL)
 			sprintf(hbuf," ERROR  Cannot open help index:\r\n          %s"
 				,api->helpixbfile);
 		else {
@@ -1695,7 +1694,7 @@ void help()
 				sprintf(hbuf," ERROR  Cannot locate help key (%s:%u) in:\r\n"
 					"         %s",p,helpline,api->helpixbfile);
 			else {
-				if((fp=_fsopen(api->helpdatfile,"rb",SH_DENYWR))==NULL)
+				if((fp=fopen(api->helpdatfile,"rb"))==NULL)
 					sprintf(hbuf," ERROR  Cannot open help file:\r\n          %s"
 						,api->helpdatfile);
 				else {
@@ -2047,24 +2046,6 @@ static int wherex(void)
 	return(x+1);
 }
 
-static FILE * _fsopen(char *pathname, char *mode, int flags)
-{
-	FILE *thefile;
-	
-	thefile = fopen(pathname, mode);
-	if (thefile != NULL)  {
-		if (flags&SH_DENYWR) {
-			flock(fileno(thefile), LOCK_SH);
-			return(thefile);
-		}
-		if (flags&SH_DENYRW) {
-			flock(fileno(thefile), LOCK_EX);
-			return(thefile);
-		}
-	}
-	return(thefile);
-}
-
 static void _putch(unsigned char ch, BOOL refresh_now)
 {
 	int	cha;
-- 
GitLab